Beispiel #1
0
 public void validateZipcode(
     String value, Object rootElement, String parent, ValidationErrors.Builder errors) {
   try {
     converter.toZipcode(value);
   } catch (Exception e) {
     errors.addTypeConversionError(rootElement, "zipcode", parent);
   }
 }
Beispiel #2
0
 public void validateAddressId(
     String value, Object rootElement, String parent, ValidationErrors.Builder errors) {
   try {
     converter.toAddressId(value);
   } catch (Exception e) {
     errors.addTypeConversionError(rootElement, "addressId", parent);
   }
 }
Beispiel #3
0
 public void validate(Object rootElement, String parent, ValidationErrors.Builder errors) {
   if (streetName == null) errors.addIsNullError(rootElement, "streetName", parent);
   if (city == null) errors.addIsNullError(rootElement, "city", parent);
 }
Beispiel #4
0
 public ValidationErrors validate(AddressStringStateValidator stateValidator) {
   ValidationErrors.Builder errors = ValidationErrors.builder();
   validate(stateValidator, this, "", errors);
   return errors.build();
 }
Beispiel #5
0
 public ValidationErrors validate() {
   ValidationErrors.Builder errors = ValidationErrors.builder();
   validate(this, "", errors);
   return errors.build();
 }