SHARE
TWEET

Untitled

a guest Apr 20th, 2019 105 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. W classes/Customer.php
  2.             'lastname' =>                    array('type' => self::TYPE_STRING, 'validate' => 'isCustomerName', 'required' => true, 'size' => 32),
  3.             'firstname' =>                    array('type' => self::TYPE_STRING, 'validate' => 'isCustomerName', 'required' => true, 'size' => 32),
  4.            ost' => false),
  5.  
  6. W override/classes utworzyłem plik o nazwie Validate.php
  7. <?php
  8. class Validate extends ValidateCore
  9. {
  10.     public static function isCustomerName($name)
  11.     {
  12.         if (preg_match(Tools::cleanNonUnicodeSupport('/www|http/ui'), $name)) {
  13.            return false;
  14.         }
  15.        
  16.         return preg_match(Tools::cleanNonUnicodeSupport('/^[^0-9!\[\]<>,;?=+()@#"°{}_$%:\/\\\*\^]*$/u'), $name);
  17.     }    
  18. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top