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

Validation Conditions for Mobile Number and Name

AashishD
Regular Contributor II
Regular Contributor II

Hi,

We have two requirements for Validation Condition for two attribute sin our Create User Form.

1. Mobile Number : It is of String Type  and the validation should be it should contain only numbers

We used the following and it isn't working

${Mobile.length() == 10 && Mobile.isNumber() && Double.valueOf(Mobile) > 0}

Update: Use Case 1 is working

 

2. Name that the user enters on the form should not be more than 15 characters and should not contain '@' . Can someone help?

4 REPLIES 4

armaanzahir
Valued Contributor
Valued Contributor

Hi @AashishD 

If you want to achieve this use case for the user request form, better to utilize the regex parameter in the dynamic attribute to define the allowed characters for the same.

Regex for Number type of length 10: 

^[0-9]{10}$

The regex for name which is alphanumeric in nature of length of max 15 char can be:

^[a-zA-Z0-9_.-]{1,15}$

armaanzahir_1-1690888086573.png

 

 

armaanzahir_0-1690887897730.png

 

 

Understanding Regex (saviyntcloud.com)

Configuring Identity Lifecycle Setup (saviyntcloud.com)

Pattern (Java Platform SE 8 ) (oracle.com)

Regex 101 

 

Thanks,

Armaan

 

Regards,
Md Armaan Zahir

AashishD
Regular Contributor II
Regular Contributor II

Hi Armaan,

The Regex option has been removed in our recent version of 23.5. Hence we are relying on the validation condition.

Update: Mobile number validation works.

Need validation condition for the name attribute:

Name that the user enters on the form should not be more than 15 characters and should not contain '@' .

AashishD
Regular Contributor II
Regular Contributor II

Hi Armaan,

My Bad. The regex appears in String type which I missed. Thanks for the help

armaanzahir
Valued Contributor
Valued Contributor

Hi @ashish ,

Regex is still there in 23.6, you'll need to just create the dynamic attribute as a string and then on an update of the same dynamic attribute, you'll find the regex field that you can use to enter your desired regex.

Thanks,

Armaan

Regards,
Md Armaan Zahir