Empleado con las revisiones

This commit is contained in:
Melina Gutierrez 2024-11-23 16:43:42 -04:00 committed by Alex Prudencio
parent 2d6c2e4327
commit da02e7dfde

View File

@ -248,11 +248,7 @@ public class EmployeeView extends BeanValidationForm<Employee> 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);
}
}