...
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 | ||||
---|---|---|---|---|
|
...