Jump to content

Address (line 2) field doesn't accept '@' symbol


massycroft

Recommended Posts

Hi dear friends of the forum,

In front-end address page, I need that my customers can insert the symbol '@' in the field Address (line 2) but currently if they do, an error message appears telling them that they can't use this symbol in that field.
I'd like to know how I can change the code in order that they can add in this field the symbol '@'.

Thank you very much in advance.

Max.

Link to comment
Share on other sites

1 hour ago, musicmaster said:

In the file classes/address.php you find a table of fields that assigns the address validator to that field. You can find that validator in the classes/validate.php file.

Thank you Musicmaster,

I've removed the symbol '@' present in the string 356 of classes/Validate.php

OLD STRING: return empty($address) || preg_match(Tools::cleanNonUnicodeSupport('/^[^!<>?=+{}_$@%]*$/u'), $address);

NEW STRING: return empty($address) || preg_match(Tools::cleanNonUnicodeSupport('/^[^!<>?=+{}_$%]*$/u'), $address);

Now it works!

Edited by massycroft
Solved (see edit history)
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...