I've building a modification in order to add two extra fields in the shipping address only - so I'm not using the default custom fields capability.
It's working fine, but one of the fields I'm adding is an additional email field (for shipping purposes only). It's a required field and I need to validate, so I'm sure they won't leave it empty.
I've managed to make it validate for guest shipping and when a registered user adds a new address in the checkout.
But I can't make it validate in the user's address book - when they edit or add a new address from there.
In catalog/controller/account/address.php I've added:
Code: Select all
if ((utf8_strlen(trim($this->request->post['telephone2'])) < 1) || (utf8_strlen(trim($this->request->post['telephone2'])) > 32)) {
$this->error['telephone2'] = $this->language->get('error_telephone');
}