user982853
user982853

Reputation: 2488

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.

Upvotes: 10

Views: 16223

Answers (2)

Andrew Whitaker
Andrew Whitaker

Reputation: 126052

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.

Upvotes: 21

Adrian P.
Adrian P.

Reputation: 5228

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

Upvotes: 6

Related Questions