You should set the name and id of your html form same as $(â#registerFormâ).validate();
For each required form element just place class=ârequiredâ and specify minlength tag inside it. For example
Name field -> class=âoptionalâ
Email field -> class = ârequired emailâ
Thats it! you will be able to validate form field textboxes without any advanced code.
For optional fields, you can specify class=âoptionalâ or just leave it.
Here is the playable code editor where you can test the validation!