Jquery form validation with two validation posts

Client side form validation is made easier with jQuery.

I've tried all validators and they are so simple!

But for date, number and range validators; I need to add two validators in sequence

1) Required 2) Date

so it's possible.

Another common requirement is to reset the Purple form . Is it possible to use jQuery without writing too much code?

0


a source to share


2 answers


You can add multiple rules at once .

As for resetting the form, there is a method for doing this built in Javascript:



$('#myform')[0].reset();

      

+1


a source


Using two validators shouldn't be a problem. Did you receive an error message?



Use the jQuery form plugin here: http://www.malsup.com/jquery/form/#api to reset.

0


a source







All Articles