diff options
author | Martín López <mlopez@flowingcode.com> | 2020-05-12 04:47:25 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-12 10:47:25 +0300 |
commit | 786ca648388335540cba09de8fbd1f234c705e70 (patch) | |
tree | d39553364a24f09f14f455bb396d1a6d9f03365d | |
parent | 4786732d33f2d7fc1be7268a1033707776f3a925 (diff) | |
download | vaadin-framework-786ca648388335540cba09de8fbd1f234c705e70.tar.gz vaadin-framework-786ca648388335540cba09de8fbd1f234c705e70.zip |
Support for javax.validation @NotEmpty annotation. (#11985)
Fixes #10914
-rw-r--r-- | server/src/main/java/com/vaadin/data/RequiredFieldConfigurator.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/server/src/main/java/com/vaadin/data/RequiredFieldConfigurator.java b/server/src/main/java/com/vaadin/data/RequiredFieldConfigurator.java index c4071e9d98..8636c68012 100644 --- a/server/src/main/java/com/vaadin/data/RequiredFieldConfigurator.java +++ b/server/src/main/java/com/vaadin/data/RequiredFieldConfigurator.java @@ -50,7 +50,8 @@ public interface RequiredFieldConfigurator */ public RequiredFieldConfigurator NOT_EMPTY = annotation -> annotation .annotationType().getName() - .equals("org.hibernate.validator.constraints.NotEmpty"); + .equals("org.hibernate.validator.constraints.NotEmpty") || annotation + .annotationType().getName().equals("javax.validation.constraints.NotEmpty"); /** * Configurator which is aware of {@literal Size} annotation with |