0

I need a jQuery form validator and don't know what kind of form validators exist and which one is popular for its ease of use and configuarbility. So I would like to ask to experienced people who used that, as far as search in Google gives me so many options that I need a long time to choose.

The validator should sattisfy to the following conditions:

  • The error message should be given in the field where the wrong data was inserted

  • highly configurable

  • very easy to use

  • should validate different kind of fields with different constraints (sometimes also user defined constraints) such as: e-mail validation, name validation (to be without numbers and symbols and only one word and so on)

Please share with me what you like to use for this porpose.

Sparky
  • 98,165
  • 25
  • 199
  • 285
Narek
  • 38,779
  • 79
  • 233
  • 389
  • 4
    a lot of people use http://bassistance.de/jquery-plugins/jquery-plugin-validation/ – JKirchartz Mar 15 '12 at 19:00
  • I agree with Jkirchartz with the validation plugin. It's very popular, and it even comes standard in a lot of frameworks. But in addition, please don't forget to setup form validation on the backside with just as strict, if not more strict guidelines to prevent SQL injection, XSS attacks, CSRF...To quote a lot of people before me, "Pretend that every user of your website is out to get you." – kdub Mar 15 '12 at 19:18
  • Possible duplicate of http://stackoverflow.com/questions/4751780/best-javascript-solution-for-client-side-form-validation-and-interaction – sinemetu1 Mar 15 '12 at 19:36

1 Answers1

3

As far as I'm concerned this is the one and only jQuery Validation plugin... written and maintained by Jörn Zaefferer who is part of the jQuery team.

  • lots of built-in Validation methods... phone, email, credit card, zip code, etc.
  • ability to write your own Validation method function(s).
  • ability to over-ride error message text globally or as per custom rule/field.
  • options for assigning rules to fields... by class, by parameter, by function, etc.
  • ability to place error messages anywhere... can even use third party plugins to make tool-tip messages.
  • can validate upon submission, on key-up, on blur, etc.
  • other methods and options too numerous to mention.

IMHO, the absolute best way to learn how to properly implement this plugin, is by looking at the demos.

...and thousands of existing Q & A on StackOverflow.

Community
  • 1
  • 1
Sparky
  • 98,165
  • 25
  • 199
  • 285