Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jquery Validate - List of Classes

This may be a very stupid question but i am looking for a list of the inline validation rules for the jquery form validator.

I know that i can find the js functions here:

but i am looking for a list of the simple inline classes like

email, url, phone, etc., and learn how to use them. I am just looking for a simple list. Thank you.

like image 470
user982853 Avatar asked Feb 19 '12 21:02

user982853


2 Answers

Looking at the source, I believe these are the only rules that can be used simply by adding classes:

  • required
  • email
  • url
  • date
  • dateISO
  • number
  • digits
  • creditcard

As for how to use them, just add them into the class attribute of your input:

<input type='text' class='required creditcard' name='credit-card' />

You'll have to define other rules in the object you pass to validate.

like image 82
Andrew Whitaker Avatar answered Nov 06 '22 11:11

Andrew Whitaker


Most probably you are looking for this

http://elegantcode.com/wp-content/uploads/2010/03/Jquery-Validator-Cheat-sheet.pdf

Founded when I was looking for same easy to remember list of validation plugin rules. :)

Update: If you like to have all things together try this too:

http://marketblog.envato.com/resources/extensive-collection-cheatsheets-web-designers

like image 44
Adrian P. Avatar answered Nov 06 '22 11:11

Adrian P.