Change Last Name With Number in Prestashop

Have you try to input numbers in your Prestashop 1.3.1 Last Name form ? You will got this error message.

Change Last Name With Number in Prestashop

Well, if you need to input a number in you last name, let say for testing purpose or for your company division profile. Heres a quick fix for fixing that problem.

First of all, go to your Prestashop 1.3.1 installation folder. Then open your classes folder. You will notice that there are 83 files in the classes folder.

What you need to search are customer.php and address.php files. For the customer.php file, go to line 75 and find this code :

protected     $fieldsValidate = array('secure_key' => 'isMd5', 'lastname' => 'isName', 'firstname' => 'isName', 'email' => 'isEmail', 'passwd' => 'isPasswd',

Change the

'lastname' =>'isName'

to

'lastname'=>'isMessage'

For the address.php file, go to line 86 and find this code :

'alias' => 'isGenericName', 'company' => 'isGenericName', 'lastname' => 'isName',

change the

'lastname'=>'isName'

to

'lastname'=>'isMessage'

And now you`re done. Don’t forget to backup your files first before doing any changes.

Related posts:

  1. Upgrade Your Prestashop
  2. Make Mail Alert Module Work in Prestashop

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>