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 navigation panel, click Cases, and then click the name of a case type.

  2. On the Workflow tab, click Life cycle.

  3. Click an assignment.

  4. Click Configure view .

  5. Click the Conditions tab.

    Click +Add condition.

  6. In the Message field, enter the text to display when validation fails.
  7. 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. From the Comparator list, select a comparator.

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

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

      Complete the following steps:

      1. Click the Plus icon next to the field after which you want to add the AND operator.

      2. Select AND from the first list in the new row.

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

      4. From the Comparator list, select a comparator.

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

      1. Optional: Add multiple AND operators to include multiple properties in the expression.

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

      Complete the following steps:

      1. Click the Plus icon next to the field after which you want to insert the OR operator.

      2. Select OR from the first list in the new row.

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

      4. From the Comparator list, select a comparator.

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

      6. Optional: Add multiple AND operators to include multiple properties in the expression.

      7. Optional: Add an OR operator to start a new expression.

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

  9. Click Done.

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.