You need to sign in to do that
Don't have an account?

I have a phone field and I want add the following rules to that field.
I have a phone field and I want add the following rules to that field.
1. If the length of the field is less than 9. It should throw an error.
2. It should not accept numbers like 111-111-1111
3. It should not contain any characters (A-Z) (a-z)
4. It should not contain special characters except "(" ")" "-" and "+"
Can anyone help help me with this. Thanks?
1. If the length of the field is less than 9. It should throw an error.
2. It should not accept numbers like 111-111-1111
3. It should not contain any characters (A-Z) (a-z)
4. It should not contain special characters except "(" ")" "-" and "+"
Can anyone help help me with this. Thanks?
I provide you a link that I have used while learning how to use REGEX() for a phone field, very easy to understand: http://www.zytrax.com/tech/web/regex.htm
For example, if I am to accept only to accept phone number formats in "+1 YXX XXXXXXX" where Y being any integer ranging from 2 to 5 and X being any integer ranging from 0 to 9. REGEX() function to ensure this format is: NOT ( REGEX( Phone,"^\\+1 [2-5][0-9]{2} [0-9]{7}$") )
All Answers
I provide you a link that I have used while learning how to use REGEX() for a phone field, very easy to understand: http://www.zytrax.com/tech/web/regex.htm
For example, if I am to accept only to accept phone number formats in "+1 YXX XXXXXXX" where Y being any integer ranging from 2 to 5 and X being any integer ranging from 0 to 9. REGEX() function to ensure this format is: NOT ( REGEX( Phone,"^\\+1 [2-5][0-9]{2} [0-9]{7}$") )