From da02e7dfdeba161c0f566715a71a7eff94756e5e Mon Sep 17 00:00:00 2001 From: Melina Gutierrez Date: Sat, 23 Nov 2024 16:43:42 -0400 Subject: [PATCH] Empleado con las revisiones --- .../java/com/primefactorsolutions/views/EmployeeView.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/main/java/com/primefactorsolutions/views/EmployeeView.java b/src/main/java/com/primefactorsolutions/views/EmployeeView.java index 0e7569a..bd8baba 100644 --- a/src/main/java/com/primefactorsolutions/views/EmployeeView.java +++ b/src/main/java/com/primefactorsolutions/views/EmployeeView.java @@ -248,11 +248,7 @@ public class EmployeeView extends BeanValidationForm implements HasUrl int birthYear = birthday.getValue().getYear(); int ages = currentYear - birthYear; age.setValue(String.valueOf(ages)); - if (ages < 18) { - birthday.setInvalid(true); - } else { - birthday.setInvalid(false); - } + birthday.setInvalid(ages < 18); System.out.println(age); } }