diff --git a/app/code/Magento/Customer/Model/Address/AbstractAddress.php b/app/code/Magento/Customer/Model/Address/AbstractAddress.php index 7b32da94ddedb..f13a475e54ab8 100644 --- a/app/code/Magento/Customer/Model/Address/AbstractAddress.php +++ b/app/code/Magento/Customer/Model/Address/AbstractAddress.php @@ -562,23 +562,23 @@ public function validate() { $errors = []; if (!\Zend_Validate::is($this->getFirstname(), 'NotEmpty')) { - $errors[] = __('Please enter the first name.'); + $errors[] = __('%fieldName is a required field.', ['fieldName' => 'firstname']); } if (!\Zend_Validate::is($this->getLastname(), 'NotEmpty')) { - $errors[] = __('Please enter the last name.'); + $errors[] = __('%fieldName is a required field.', ['fieldName' => 'lastname']); } if (!\Zend_Validate::is($this->getStreetLine(1), 'NotEmpty')) { - $errors[] = __('Please enter the street.'); + $errors[] = __('%fieldName is a required field.', ['fieldName' => 'street']); } if (!\Zend_Validate::is($this->getCity(), 'NotEmpty')) { - $errors[] = __('Please enter the city.'); + $errors[] = __('%fieldName is a required field.', ['fieldName' => 'city']); } if (!\Zend_Validate::is($this->getTelephone(), 'NotEmpty')) { - $errors[] = __('Please enter the phone number.'); + $errors[] = __('%fieldName is a required field.', ['fieldName' => 'telephone']); } $_havingOptionalZip = $this->_directoryData->getCountriesWithOptionalZip(); @@ -590,11 +590,11 @@ public function validate() 'NotEmpty' ) ) { - $errors[] = __('Please enter the zip/postal code.'); + $errors[] = __('%fieldName is a required field.', ['fieldName' => 'postcode']); } if (!\Zend_Validate::is($this->getCountryId(), 'NotEmpty')) { - $errors[] = __('Please enter the country.'); + $errors[] = __('%fieldName is a required field.', ['fieldName' => 'countryId']); } if ($this->getCountryModel()->getRegionCollection()->getSize() && !\Zend_Validate::is( @@ -604,7 +604,7 @@ public function validate() $this->getCountryId() ) ) { - $errors[] = __('Please enter the state/province.'); + $errors[] = __('%fieldName is a required field.', ['fieldName' => 'regionId']); } if (empty($errors) || $this->getShouldIgnoreValidation()) {