fixed phone number validation error on opc page
This commit is contained in:
@@ -1159,8 +1159,12 @@ class AdminCustomersControllerCore extends AdminController
|
||||
$this->errors[] = Tools::displayError('Phone number is required.');
|
||||
}
|
||||
}
|
||||
$className = 'CartCustomerGuestDetail';
|
||||
$rules = call_user_func(array($className, 'getValidationRules'), $className);
|
||||
if ($phone && !Validate::isPhoneNumber($phone)) {
|
||||
$this->errors[] = Tools::displayError('Invaid phone number.');
|
||||
} elseif ($phone && Tools::strlen($phone) > $rules['size']['phone']) {
|
||||
$this->errors[] = Tools::displayError('Invaid phone number.');
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user