diff options
Diffstat (limited to 'documentation')
-rw-r--r-- | documentation/datamodel/datamodel-forms.asciidoc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/documentation/datamodel/datamodel-forms.asciidoc b/documentation/datamodel/datamodel-forms.asciidoc index 8acbffdd7a..fc21226358 100644 --- a/documentation/datamodel/datamodel-forms.asciidoc +++ b/documentation/datamodel/datamodel-forms.asciidoc @@ -151,9 +151,9 @@ binder.forField(nameField) name -> name.length() >= 3, "Full name must contain at least three characters") .withStatusChangeHandler(statusChange -> { - nameStatus.setValue(statusChange.getMessage()); + nameStatus.setValue(statusChange.getMessage().orElse("")); // Only show the label when validation has failed - boolean error = statusChange.getStatus() == Status.ERROR; + boolean error = statusChange.getStatus() == ValidationStatus.ERROR; nameStatus.setVisible(error); }) .bind(Person::getName, Person::setName); |