I have a number field that I need to have at least 3 digits or more. I can also have it just validate that it has three digits (not necessarily 3 or more) if that makes it easier. The problem is that I don’t want it to validate that the field is 100 or more, I want it to validate that there are three digits as in 001 or 010 or 100 (or and number in that format like 037 or 861 or 005 etc…).
This is basically a three digit security code for a credit card. and it might be 067 but if the user just enters 67 then I don’t know if they missed the last digit or if it was supposed to be 067. I also want to throw an error at the user so that they don’t leave off a digit.
Thanks,
-Darrin




August 18, 2011 at 2:06 pm
Here's some sample code you can add to a new plugin or your theme functions.php to do this:
http://formidablepro.com/help-desk/validate-field-length/
August 19, 2011 at 8:03 am
Thanks, got it to work. :)
-Darrin
Topic closed.