NYPD / ritsu.js

HTML form validation
MIT License
2 stars 0 forks source link

Have the various $selector parameter methods take in a form selector #10

Closed NYPD closed 7 years ago

NYPD commented 8 years ago

Would be much easier for someone to pass in a form object rather then select every single input in a form.

For example

var $form = $('form');
ritsu.validate($form );

vs

var $formInputs = $('form input, form textarea, form select');
ritsu.validate($formInputs);
NYPD commented 8 years ago

Funny thing i noticed is the .validate() method already does this, just not the others.