Hi,
I created a validation rule for Phone field which
1. Should only contain numbers(no special characters# or text)
2.Should only contain 10 digits
OR( NOT( (LEN(Phone) == 10)), !REGEX(Phone, "[0-9]*") )
3.User should also be able to save record even if Phone field is blank------> This is causing error. How can I achieve this?
Thanks
5 answers
Eric Praud (Activ8 Solar Energies) Forum Ambassador
Hi,
Try:
AND(
NOT(ISBLANK(Phone),
NOT(REGEX(Phone,"[0-9]{10}")))
or
AND(
NOT(ISBLANK(Phone),
NOT(REGEX(Phone,"\\d{10}")))