The jQuery Validation plugin works great and is very easy to use:
$(\".selector\").validate({
})
Just by setting css classes like \"require
jQuery.validator.addClassRules(); will attach the validation to class, but there is no option for messages, it will use the general error messages.
If you want that to work then, you should refactor the rules like this
$.validator.addMethod(
"newEmail", //name of a virtual validator
$.validator.methods.email, //use the actual email validator
"Random message of email"
);
//Now you can use the addClassRules and give a custom error message as well.
$.validator.addClassRules(
"email", //your class name
{ newEmail: true }
);