Number length validation

Home Forums Jquery Validation for Contact Form 7 Number length validation

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #733
    Jon
    Guest

    Is it possible to specify the amount of numbers used in a text field?

    So, for example, if I want the user to only enter a 5 digit number, I’d use the number class, but how do I control the length?

    Is this possible?

     

     

    #734
    Dinesh
    Keymaster

    For length of the field, you can use the maxlength from the contact form 7.

    #736
    Jon
    Guest

    That will control the length, yes, but it doesn’t stop the form being submitted if the user only enters 4 digits and you require 7.  I didn’t know if there was a way that assured that the user could only enter say 7 digits, and entering less than 7 would bring up the validation warning.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Number length validation’ is closed to new replies.