public static final int MINIMUM_AGE = 16;
+ public static final int MAXIMUM_PLAUSIBLE_AGE = 120;
+
public static final int POJAM_AGE = 14;
public static final int ADULT_AGE = 18;
public static final boolean POJAM_ENABLED = false;
- public static final int EXPERIENCE_POINTS = 2;
+ public static final int EXPERIENCE_POINTS = 4;
/**
* Time in months a verification is considered "recent".
public void setDoB(DayDate dob) throws GigiApiException {
synchronized (Notary.class) {
if (getReceivedAssurances().length != 0) {
- throw new GigiApiException("No change after assurance allowed.");
+ throw new GigiApiException("No change after verification allowed.");
+ }
+
+ if ( !CalendarUtil.isOfAge(dob, User.MINIMUM_AGE)) {
+ throw new GigiApiException("Entered date of birth is below the restricted age requirements.");
+ }
+
+ if (CalendarUtil.isOfAge(dob, User.MAXIMUM_PLAUSIBLE_AGE)) {
+ throw 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.");
}
this.dob = dob;
rawUpdateUserData();