Jump to content

Edit rules for Firstname and Lastname


Recommended Posts

Dear Prestashop comunity,

Can anybody please tell me where I can edit the rules for input data?
I am using Prestashop 1.4.2.5.
The front office language is set to Russian.
So, when you fill the required field name with a popular Russian name “Вася” it says name is incorrect, BUT: it accepts the set of letters without any meaning “Вывывывывы”.
It seems like input data validation rules are not exactly correct for Cyrillic encoding.

So, where can I edit these rules?

Link to comment
Share on other sites

It is about regular expressions.

I found the following line in classes/validate.php:

       static public function isName($name)
   {
       return preg_match('/^[^0-9!<>,;?=+()@#"°{}_$%:]*$/', stripslashes($name));
   }



I just removed this symbol "°" from the line.
And now it works.

I wonder, why "°" affects Cyrillic letters? Does anybody now that?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...