Playing with JQuery Validation Library, Part 2 | Elegant Code - 2 views
-
The new part is the remote in the script. You give it the name/location of your web service to call to validate the field, and the field name/value are passed in.
-
1: $('#UserNameForm').validate({ 2: rules: { 3: userNameEdit: { required: true, remote: "<%=Url.Action("VerifyUserName", "Account") %>" } 4: } 5: });