Saviynt unveils its cutting-edge Intelligence Suite products to revolutionize Identity Security!
Click HERE to see how Saviynt Intelligence is transforming the industry.
Saviynt Copilot Icon

Regex validator phone number user form

Shubhamjain27
Regular Contributor II
Regular Contributor II

Hi Everyone,

We have a requirement where we need to add a validator for phone number.

It should start with + and then digits.

Below is the validator I am using under Validation Condition - ${phoneNumber = ~ /^\+?[1-9]\d{1,14}$/}

But for all the phone number it is giving validation failed error.

Tried below combination:

+14155552671
+442071838750
+551155256325

Any help is appreciated.

4 REPLIES 4

rushikeshvartak
All-Star
All-Star

Refer https://forums.saviynt.com/t5/identity-governance/phone-regex-validator/m-p/36824#M20847


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

Same I tried but not working

@Shubhamjain27  try below

^([\+0-9()]{1,5}(\s?))?[0-9\s.\-()]{8,18}$

 


Thanks,
Raghu
If this reply answered your question, Please Accept As Solution and hit Kudos.

Shubhamjain27
Regular Contributor II
Regular Contributor II

Tried the above, working in regex online validator but not in Saviynt.

Below is the screenshot of DA:

Shubhamjain27_0-1717487438699.png

 

and tried the below regex and combinations:

Shubhamjain27_1-1717487460513.png

Tried below regex values:

^([\+0-9()]{1,5}(\s?))?[0-9\s.\-()]{8,18}$

/^([\+0-9()]{1,5}(\s?))?[0-9\s.\-()]{8,18}$/

~ /^([\+0-9()]{1,5}(\s?))?[0-9\s.\-()]{8,18}$/

It is not showing any error but the validation fails:

Shubhamjain27_2-1717487555827.png