Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

Regex validator phone number user form

Shubhamjain27
New Contributor III
New Contributor III

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 you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

Same I tried but not working

Raghu
Honored Contributor
Honored Contributor

@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
New Contributor III
New Contributor III

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