How to Validate a Minimum Number of Characters

Version 1


    This article demonstrates how to create a validation rule in the Self Service of ITSM 7.2.x, but it would be quite similar in the recent versions of HEAT 201x.  In this case, the validation rule will check that a field has a minimum number of characters.



    Please follow this procedure for validating the number of characters in a field:

    1. Access the AdminUI of the Self Service in ITSM 7.2.x (it would be the AdminUI in HEAT 201x)
    2. Open the Business Rules in the Business Object where the field needs to be validated
    3. Add a new Validation on Save Rule

    4. Create it with the following values, modifying the number of the characters and the field with your requirements. In this example, we chose the Summary field of the Incident Business Object:

      Function Len: counts the number of characters
      Function Trim: deletes the spaces before and after the string that is going to be evaluated
      Expression: $(Len(Trim(Subject)) >= 10)
      Message: The summary must have at least 10 characters

    5. Save and reload the top level tab for check it out.