From cdb53c3766fd4e278a0588c3580994d7ba499a9b 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); } }