Advertisement
Guest User

Untitled

a guest
Apr 20th, 2019
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  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. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement