Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Custom validator function has structure:

Code Block

public boolean validatorName(final DataDefinition dataDefinition, final Entity entity) {

        // VALIDATOR METHOD BODY

}

...

Code Block
   entity.addError(dataDefinition.getField("fieldName"), "validationMessage");

Where

  • fieldName - name of entity model field
  • validationMessage - validation message

Anchor
modelHooks
modelHooks

...