Skip to main content

Custom Validations

Outdated documentation page

This is an old version of the documentation for Flowable until version 3.13 and for the Angular-based Flowable Design 3.14/3.15. If you are running the latest version of Flowable please check out the current version of this page.

Custom validations let you make the form invalid when a condition is not met. You can apply custom validations to any component, and the error messages will be rendered close to it. Custom validations it's a list of validations. A validation has two parts:

  • expression: It's an expression that returns a boolean. When the returned value is true, the validation is ok and no error will be shown.
  • error message: It's a message that will be shown to the user when the validation is not ok.

For example

ExpressionError Message
{{!num || num % 2 === 0}}{{num}} must be even

or

ExpressionError Message
{{phone || email}}Please fill in at least one contact method

Please note that error messages are shown for a component only when the user wrote the information inside it. Most time it means when the user focus left the input.