You are here: Case management > Building a form > Adding validation to fields on a form

Adding validation to fields on a form

You can validate the values of fields on a form. By using validation, you can prevent a case from moving to the next step in the life cycle when the user input does not meet the required conditions.

For example, you can ensure that a customer name, address, and phone number are provided before a customer places a product order.

  1. In the explorer panel of Designer Studio, click Cases and then click the name of a case type.

  2. On the Life cycle tab, click an assignment.

  3. Click Configure view.

  4. Click the Conditions tab.

    Click +Add condition.

  5. Optional: In the Message field, enter the text to display when validation fails.

  6. Define the validation conditions for each field on the form by doing the following:

    1. From the Field list, select the name of a field that supports validation.

    2. Select a comparator from the Comparator list.

    3. In the Value field, enter a value to compare with the user input, if applicable.

    4. Add an AND operator if you want to use another property in the expression. If all properties meet the defined criteria, the condition passes.

    5. Add an OR operator if you want to use another property in the condition. If either property meets the defined criteria, the condition passes.

  7. Click Add condition and repeat the previous step to define more validation conditions.

  8. Click Submit.

At run time, all validation conditions are evaluated. If any condition fails, an error message is displayed, and the form is not submitted until the user corrects the invalid fields.