|
|
@@ -33,6 +33,7 @@ public class BirthCertificateCommandPartThreeValidatorImpl implements BirthCerti
|
|
|
validateWhenBorn(birthCertificateCommand, bindingResult);
|
|
|
validateFatherAndUntrackedFather(birthCertificateCommand, bindingResult);
|
|
|
validateWhereBornAndUntrackedWhereBorn(birthCertificateCommand, bindingResult);
|
|
|
+ validateWhenRegistered(birthCertificateCommand, bindingResult);
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -62,4 +63,14 @@ public class BirthCertificateCommandPartThreeValidatorImpl implements BirthCerti
|
|
|
"whereBorn", "untrackedWhereBorn", ValidationConstants.WHERE_BORN_AND_UNTRACKED_WHERE_BORN,bindingResult);
|
|
|
}
|
|
|
|
|
|
+ private void validateWhenRegistered(BirthCertificateCommand birthCertificateCommand, BindingResult bindingResult) {
|
|
|
+ logger.debug("Validating birth certificate Registration Date");
|
|
|
+ validateTypes.validatePastDate(birthCertificateCommand.getWhenRegistered(),
|
|
|
+ "whenRegistered",
|
|
|
+ ValidationConstants.WHEN_REGISTERED_DATE_IS_NULL,
|
|
|
+ ValidationConstants.WHEN_REGISTERED_DATE_IS_INVALID,
|
|
|
+ ValidationConstants.WHEN_REGISTERED_DATE_IN_FUTURE,
|
|
|
+ bindingResult);
|
|
|
+ }
|
|
|
+
|
|
|
}
|