I have an e-mail field, and a confirm e-mail field. I need to validate both of them to make sure their values match.
Is there a way to add a rule to match those two fields?
You could use the equalTo method:
$('#myform').validate({ rules: { email: 'required', emailConfirm: { equalTo: '#email' } } });
1.4m articles
1.4m replys
5 comments
57.0k users