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!