function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
DeekDeek 

Phone no validation

Hi All,

Need help in buiding a phone no validation in the following format:

+## # #### ####

For e.g +65 7 1234 5678 with the spaces as shown

I have this regex but somehow its not working as expected. 

Please help.

NOT(REGEX(Phone, "\\+[0-9]{2}\s([0-9]{1}\s[0-9]{4}\s([0-9]{4})")))
MagulanDuraipandianMagulanDuraipandian
Try the same with custom number field

If this solves your problem, kindly mark it as the best answer.

Regards,
Magulan
http://www.infallibletechie.com
DeekDeek
Hi

I tried with custom field and still not working. Please advise further. It throws syntax error.
@anilbathula@@anilbathula@
Hi Deek,

Try this validation rule.
hope it works for you .
NOT( REGEX( Phone,"(\\D?[+]{1}[0-9]{2}\\D?)[\\s][0-9]{1}[\\s][0-9]{4}[\\s][0-9]{4}"))

Thanks
Anil.B