Пример #1
0
 private void validateBirthDate(Errors errors, ApplicantBean appBean) {
   if (!DataDictionaryValidator.validateDateOfBirthDOB(
       DateUtil.formatDate(appBean.getPlaceOfBirthInfo().getBrthDob()), true)) {
     errors.rejectValue(
         "placeOfBirthInfo.brthDob",
         "error.li.person.dob",
         null,
         "Invalid Date of birth(Format:mm/dd/yyyy). - "
             + appBean.getPlaceOfBirthInfo().getBrthDob());
   }
 }
Пример #2
0
  private void validateBirthInfo(Errors errors, ApplicantBean appBean) {

    if (!DataDictionaryValidator.validateCity(appBean.getPlaceOfBirthInfo().getCity(), false)) {
      errors.rejectValue(
          "placeOfBirthInfo.city", "error.li.person.cityofbirth", null, "Invalid city of birth.");
    }

    if ("TX".equalsIgnoreCase(appBean.getPlaceOfBirthInfo().getState())
        && !DataDictionaryValidator.validateCounty(
            appBean.getPlaceOfBirthInfo().getCounty(), false)) {
      errors.rejectValue(
          "placeOfBirthInfo.county", "error.li.person.county", null, "Invalid county of birth.");
    }

    if (!DataDictionaryValidator.validateState(appBean.getPlaceOfBirthInfo().getState(), false)) {
      errors.rejectValue(
          "placeOfBirthInfo.state", "error.li.person.state", null, "Invalid state of birth.");
    }
    if (!DataDictionaryValidator.validateCountry(
        appBean.getPlaceOfBirthInfo().getCountry(), false)) {
      errors.rejectValue(
          "placeOfBirthInfo.country", "error.li.person.country", null, "Invalid Country of birth.");
    }

    if (!DataDictionaryValidator.validateDateOfBirthDOB(
        DateUtil.formatDate(appBean.getPlaceOfBirthInfo().getBrthDob()), true)) {
      errors.rejectValue(
          "placeOfBirthInfo.dateOfBirth",
          "error.li.person.dob",
          null,
          "Invalid Date of birth(Format:mm/dd/yyyy). - "
              + appBean.getPlaceOfBirthInfo().getBrthDob());
    }
  }
Пример #3
0
  /**
   * Added the method only for Place of Birth Validation. AddDLPlaceOfBirth.jsp
   *
   * @param errors
   * @param appBean
   */
  private void validatePlaceOfBirthInfo(Errors errors, ApplicantBean appBean) {
    if (!DataDictionaryValidator.validateCity(appBean.getPlaceOfBirthInfo().getCity(), true)) {
      errors.rejectValue(
          "placeOfBirthInfo.city", "error.li.person.cityofbirth", null, "Invalid city of birth.");
    }

    if ("US".equalsIgnoreCase(appBean.getPlaceOfBirthInfo().getCountry())
        && !DataDictionaryValidator.validateCounty(
            appBean.getPlaceOfBirthInfo().getCounty(), true)) {
      errors.rejectValue(
          "placeOfBirthInfo.county", "error.li.person.county", null, "Invalid county of birth.");
    }

    if (!DataDictionaryValidator.validateState(appBean.getPlaceOfBirthInfo().getState(), true)) {
      errors.rejectValue(
          "placeOfBirthInfo.state", "error.li.person.state", null, "Invalid state of birth.");
    }
    if (!DataDictionaryValidator.validateCountry(
        appBean.getPlaceOfBirthInfo().getCountry(), true)) {
      errors.rejectValue(
          "placeOfBirthInfo.country", "error.li.person.country", null, "Invalid Country of birth.");
    }
  }