Symantec IGA

 View Only
  • 1.  Validation error message in IP

    Posted Sep 12, 2019 03:18 AM
    Hi All,
     
      I am trying to put a validation for firstname as First name should not contain space or number or special character. But it is not working as expected. If i give anyvalue it is showing validation error.

     Can you please help in this, how write a validation for  First name should not contain space or number or special character.





    Thanks,
    Jeevan


  • 2.  RE: Validation error message in IP
    Best Answer

    Broadcom Employee
    Posted Sep 12, 2019 09:34 AM
    Hi Jeevan,

    You need to use a regular expression to validate. A good site to test RegEx with a library of examples is regex101.com. You can test your expressions against a test list of inputs live which helps a lot. 

    In this case, I was able to create the following that only allows alphabetic characters, does not allow spaces, only allows a capital letter as the first character, and makes sure the string is 3-25 characters long (the 2,24 below is for the character validation after the first letter):

    ^[A-Z]([A-Za-z]){2,24}$

    I tested this in my environment and it validates correctly.

    Thanks,
    Mike