]> WPIA git - gigi.git/blobdiff - src/org/cacert/gigi/pages/main/Signup.java
add: check DoB upper limit
[gigi.git] / src / org / cacert / gigi / pages / main / Signup.java
index 7cc389e72e2ac2b249c0b4c78773cdc5a8f3d04a..416788e5f77846ff5f290cf7b5ac416b87eb073f 100644 (file)
@@ -93,7 +93,11 @@ public class Signup extends Form {
         }
 
         if ( !CalendarUtil.isOfAge(myDoB.getDate(), User.MINIMUM_AGE)) {
-            ga.mergeInto(new GigiApiException("Entered dated of birth is below the restricted age requirements."));
+            ga.mergeInto(new GigiApiException("Entered date of birth is below the restricted age requirements."));
+        }
+
+        if (CalendarUtil.isOfAge(myDoB.getDate(), 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."));
         }
 
         if ( !"1".equals(req.getParameter("tos_agree"))) {