Here is what I am currently using to attempt to validate a form. When I press submit with no values entered into the form, I get the error messages for each of the inputs a
@Tom try
newpassword1: { required: true },
newpassword2: { required: true,equalTo: "#newpassword1"},
newemail1: { required: true, email: true },
newemail2: { required: true,email: true ,equalTo: "#newemail1" }
or use the latest version of validation plugin
Now rules have added with password being required set to true and the second condition is for password_again set to required true and it has to “equalTo” the input field with id of password. With these conditions set, we are able to achieve what we are wanting. Do not forget to check the demo of the post to see how it works. For more documentation and resource on this plugin visit jQuery Validation Plugin