how can I validate a phone number with country code on the record producer side , any help ?

getnet bantie
Tera Contributor

I have phone number field and I want to populate it on the record producer side .

2 REPLIES 2

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

you can use variable validation Regex for this and no script required.

Refer few OOB ones

Regex for US Phone for example I created -> you can enhance it as per your requirement

^\(?(\d{3})\)?[- ]?(\d{3})[- ]?(\d{4})$

US Phone vallidation.gif

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

sherylburke
Tera Contributor

Hi there! Validation of a phone number with country code on the record producer side is quite difficult. Initially, it would be the best to use a phone number creator. I love this kind of tools, as I'm not enthusiastic about using my personal data online. Don't worry if you don't know how to generate temporary phone number. It's a piece of cake. I use it all the time to register on a website more securely.  And the best part is that I can use this tools no matter where I am. So, if I were you, I'd give it a try.