[*] BO : #PSCFV-3831 : check each field which are required in databases
This commit is contained in:
@@ -182,6 +182,9 @@ class AddressControllerCore extends FrontController
|
||||
AND deleted = 0') > 0)
|
||||
$this->errors[] = sprintf(Tools::displayError('The alias "%s" is already used, please chose another one.'), Tools::safeOutput($_POST['alias']));
|
||||
|
||||
// Check the requires fields which are settings in the BO
|
||||
$this->errors = array_merge($this->errors, $address->validateFieldsRequiredDatabase());
|
||||
|
||||
// Don't continue this process if we have errors !
|
||||
if ($this->errors && !$this->ajax)
|
||||
return;
|
||||
|
||||
@@ -394,6 +394,10 @@ class AuthControllerCore extends FrontController
|
||||
if (!Tools::getValue('phone') && !Tools::getValue('phone_mobile') && Configuration::get('PS_REGISTRATION_PROCESS_TYPE'))
|
||||
$this->errors[] = Tools::displayError('You must register at least one phone number');
|
||||
$this->errors = array_unique(array_merge($this->errors, $customer->validateController()));
|
||||
|
||||
// Check the requires fields which are settings in the BO
|
||||
$this->errors = array_merge($this->errors, $customer->validateFieldsRequiredDatabase());
|
||||
|
||||
if (!Configuration::get('PS_REGISTRATION_PROCESS_TYPE') && !$this->ajax && !Tools::isSubmit('submitGuestAccount'))
|
||||
{
|
||||
if (!count($this->errors))
|
||||
|
||||
Reference in New Issue
Block a user