Class TmaGeographicAddressValidationCreateValidator

java.lang.Object
de.hybris.platform.b2ctelcotmfwebservices.v3.validators.TmaGeographicAddressValidationCreateValidator
All Implemented Interfaces:
org.springframework.validation.Validator

public class TmaGeographicAddressValidationCreateValidator extends Object implements org.springframework.validation.Validator
Since:
2302
  • Constructor Details

    • TmaGeographicAddressValidationCreateValidator

      public TmaGeographicAddressValidationCreateValidator()
  • 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
    • validateCountry

      protected void validateCountry(GeographicAddress geographicAddress, org.springframework.validation.Errors errors)
      Checks if the country code is empty
      Parameters:
      geographicAddress - the geographic address
      errors - the errors found
    • validateStateOfProvinceAndPostCode

      protected void validateStateOfProvinceAndPostCode(GeographicAddress geographicAddress, org.springframework.validation.Errors errors)
      Checks if the at least one of postcode and stateOfProvince are present
      Parameters:
      geographicAddress - the geographic address
      errors - the errors found