Click HERE to see how Saviynt Intelligence is transforming the industry. |
08/01/2023 03:19 AM - edited 08/02/2023 05:15 AM
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?
Solved! Go to Solution.
08/01/2023 04:08 AM
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}$
Understanding Regex (saviyntcloud.com)
Configuring Identity Lifecycle Setup (saviyntcloud.com)
Pattern (Java Platform SE 8 ) (oracle.com)
Thanks,
Armaan
08/02/2023 05:14 AM
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 '@' .
08/02/2023 05:22 AM
Hi Armaan,
My Bad. The regex appears in String type which I missed. Thanks for the help
08/02/2023 05:17 AM
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