0

I use JQ - validation plugin to validate my form. But i dont know what kind of validation rules in jquery! Could you suggest me a page where i can read about rules?

I have two field, NAME and AGE, and i want it to validate for REQUIRED, MAXLENGTH, NUMBER /CHAR, MIN, MAX

 rules: {
    new_name: {
    required: true,
    maxlength: 30,
    **number: false  //?? I dont want to allowd numbers, only alphabetic chars.**

 },
 new_age: {
    required: true,
    maxlength: 3,
    **chars: false  //?? I dont want to allowd numbers, only alphabetic chars.**
    **min: 1 // 1 is the lowest number what they allowed**
     **max: 30 // 120 is the highest number what they allowed**
 },

Is it possible, without write an own rule?

Thank you.

Holian
  • 5
  • 3

2 Answers2

0

You can find everything about the validation plugin here: http://bassistance.de/jquery-plugins/jquery-plugin-validation/

Furthermore, reading the code of the examples might help you: http://jquery.bassistance.de/validate/demo/

brainfck
  • 9,286
  • 7
  • 28
  • 29
0

You can find your validating requirements for chars using regex here:
JQuery validate: How to add a rule for regular expression validation?

Community
  • 1
  • 1
o.k.w
  • 25,490
  • 6
  • 66
  • 63