Showing posts with label Validation. Show all posts
How to Compare two fields with jQuery validate plugin?
Consider the following HTML.
- <input type="text" id="txtEmail" name="Email" />
- <input type="text" id="txtConfirmEmail" name="ConfirmEmail" />
- $('#myform').validate({
- rules: {
- Email: { required: true },
- ConfirmEmail: { equalTo: '#txtEmail' }
- }
- });