$this->
validateField('additionalAddressLine1',
$address->
getAdditionalAddressLine1(),
$this->
getAdditionalAddressline1Constraints());
$this->
validateField('additionalAddressLine2',
$address->
getAdditionalAddressLine2(),
$this->
getAdditionalAddressline2Constraints());
if ($address->
getCountry() &&
$address->
getCountry()->
getForceStateInRegistration()) { $this->
validateField('state',
$address->
getState(),
[new NotBlank()]);
} if ($customerType === Customer::CUSTOMER_TYPE_BUSINESS
) { $this->
validateField('company',
$address->
getCompany(),
[new NotBlank()]);
if ($this->config->
offsetGet('vatcheckrequired'
)) { $this->
validateField('vatId',
$address->
getVatId(),
[new NotBlank()]);
} } if ($this->validationContext &&
$this->validationContext->
getViolations()->
count()) { throw new ValidationException($this->validationContext->
getViolations());
} } /**
* {@inheritdoc}
*/