]> WPIA git - gigi.git/blobdiff - src/club/wpia/gigi/pages/main/Signup.java
fix: correct validation of minimum and maximum ages
[gigi.git] / src / club / wpia / gigi / pages / main / Signup.java
index 8c070782278a9dafcaca76fd0d1dcdf9d0919454..746fd803a6bee2790cd6f37c2ac4070ee8a47fde 100644 (file)
@@ -120,7 +120,7 @@ public class Signup extends Form {
             ga.mergeInto(new GigiApiException("Entered date of birth is below the restricted age requirements."));
         }
 
-        if (CalendarUtil.isOfAge(myDoB.getDate(), User.MAXIMUM_PLAUSIBLE_AGE)) {
+        if (CalendarUtil.isYearsInFuture(myDoB.getDate().end(), User.MAXIMUM_PLAUSIBLE_AGE)) {
             ga.mergeInto(new GigiApiException("Entered date of birth exceeds the maximum age set in our policies. Please check your DoB is correct and contact support if the issue persists."));
         }