You need to sign in to do that
Don't have an account?
Ben Olsen 12
REGEX phone number validation
I'm getting a syntax error when using this in a validation rule, any ideas ? NOT( REGEX(Phone,"[0-9\(\)\s\-\+]"))
function readOnly(count){ }
You need to sign in to do that
Don't have an account?
Try the below Regex
REGEX =/^[1-9]\d{0,1}(\.\d{2})?$/;
This works fine for 0 to 99.99.
Please let me know if this helps
Best Regards
NagaKiran
All Answers
Try the below Regex
REGEX =/^[1-9]\d{0,1}(\.\d{2})?$/;
This works fine for 0 to 99.99.
Please let me know if this helps
Best Regards
NagaKiran
Exmple 1:-
NOT(
REGEX( Phone, "^\\+([0-9 ]+)$" ) &&
LEN( SUBSTITUTE(Phone, " ", "") ) < 26 &&
LEN( SUBSTITUTE(Phone, " ", "") ) > 6
)
Example 2:-
US phone numbers should be in this format: (999) 999-9999 Please let us know if this will help you
Thanks
Amit Chaudhary
Is it possible to limit the amount of numbers so the phone number doesn't exceed 10 numbers or 11 if they have to deal 1 before the area code? For example your REGEX(Phone, ".{0,}[A-Za-z]+.{0,}") worked great for accepting these formats xxx-xxx-xxxx, (xxx) xxx-xxxx and xxxxxxxxxx while limiting alphabetical letters which has been my biggest pain point using REGEX so far. It is however allowing numbers this long for example
"5555555555333333" ,Thanks,