java.lang.Object
de.hybris.platform.acceleratorstorefrontcommons.forms.validation.AddressValidator
All Implemented Interfaces:
org.springframework.validation.Validator

@Component("addressValidator") public class AddressValidator extends Object implements org.springframework.validation.Validator
Validator for address forms. Enforces the order of validation
  • Constructor Details

    • AddressValidator

      public AddressValidator()
  • Method Details

    • supports

      public boolean supports(Class<?> aClass)
      Specified by:
      supports in interface org.springframework.validation.Validator
    • validate

      public void validate(Object object, org.springframework.validation.Errors errors)
      Specified by:
      validate in interface org.springframework.validation.Validator
    • validateStandardFields

      protected void validateStandardFields(AddressForm addressForm, org.springframework.validation.Errors errors)
    • validateCountrySpecificFields

      protected void validateCountrySpecificFields(AddressForm addressForm, org.springframework.validation.Errors errors)
    • validateStringField

      protected static void validateStringField(String addressField, AddressValidator.AddressField fieldType, int maxFieldLength, org.springframework.validation.Errors errors)
    • validateStringFieldLength

      protected static void validateStringFieldLength(String field, AddressValidator.AddressField fieldType, int maxFieldLength, org.springframework.validation.Errors errors)
    • validateFieldNotNull

      protected static void validateFieldNotNull(String addressField, AddressValidator.AddressField fieldType, org.springframework.validation.Errors errors)