Creare override/classes/Validate.php duplicando il file originale e aggiungendo la seguente funzione
public static function isCustomerName($name) { if (preg_match(Tools::cleanNonUnicodeSupport('/www|http/ui'),$name)) return false; return preg_match(Tools::cleanNonUnicodeSupport('/^[^0-9!\[\]<>,;?=+()@#"°{}_$%:\/\\\*\^]*$/u'), $name); }
Creare override/classes/Customer.php duplicando il file originale e modificando il seguente codice
DA
'lastname' => array('type' => self::TYPE_STRING, 'validate' => 'isName', 'required' => true, 'size' => 32), 'firstname' => array('type' => self::TYPE_STRING, 'validate' => 'isName', 'required' => true, 'size' => 32),
A
'lastname' => array('type' => self::TYPE_STRING, 'validate' => 'isCustomerName', 'required' => true, 'size' => 32), 'firstname' => array('type' => self::TYPE_STRING, 'validate' => 'isCustomerName', 'required' => true, 'size' => 32),
Testata con PrestaShop 1.6.x