From 786ca648388335540cba09de8fbd1f234c705e70 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Mart=C3=ADn=20L=C3=B3pez?= Date: Tue, 12 May 2020 04:47:25 -0300 Subject: [PATCH] Support for javax.validation @NotEmpty annotation. (#11985) Fixes #10914 --- .../main/java/com/vaadin/data/RequiredFieldConfigurator.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 -- 2.39.5