Cognito Forms logo

Custom error

With the "Show Custom Error" option (located in the settings area of almost every field type), you can set a custom error message that will display under your field when certain criteria become true. Using both advanced and conditional logic, you can add any number of rules for validating your field.

  • By default, the Show Custom Error option is set to Never. When you select When, two sections will appear:

  • In the first section, you can open the conditional logic builder and specify the conditions that will result in a validation error for the field. For example, you can set a Date field so that users cannot select Sunday as the day of the week:

  • Once your rules are in place, you can write an error message in the second box:

  • So, when a user fills out the date field and selects a Sunday, they will see a custom message explaining exactly what the error is:

Related posts

Learn more about what you can do with custom error validation, including:

  1. Ensuring that two fields have the same value
  2. Preventing duplicate choices
  3. Displaying alternate messages
  4. Requiring specific answers
Printable View