- if ( !"1".equals(req.getParameter("cca_agree"))) {
- outputError(out, req, "You have to agree to the SomeCA Community agreement.");
+
+ if ( !CalendarUtil.isOfAge(myDoB.getDate(), User.MINIMUM_AGE)) {
+ outputError(out, req, "Entered dated of birth is below the restricted age requirements.");
+ }
+
+ if ( !"1".equals(req.getParameter("tos_agree"))) {
+ outputError(out, req, "Acceptance of the ToS is required to continue.");