Adria Laxson Posted October 20, 2010 Share Posted October 20, 2010 Customer account setup: I've changed my fields and made the mobile phone field a sales tax permit field. It's still set up as a numeric number which has worked until recently. Now I have customers with Alphanumeric sales tax numbers and they can't enter the letters. How can I take the restrictions off the phone field? It still needs to be required. Link to comment Share on other sites More sharing options...
rocky Posted October 21, 2010 Share Posted October 21, 2010 You will need to change the phone number validation code on lines 4[spam-filter]494 of classes/Validate.php (in PrestaShop v1.3.2): static public function isPhoneNumber($phoneNumber) { return preg_match('/^[+0-9. ()-]*$/ui', $phoneNumber); } For example, to allow a-z to be entered, change line 493 to: return preg_match('/^[+a-z0-9. ()-]*$/ui', $phoneNumber); Link to comment Share on other sites More sharing options...
Adria Laxson Posted October 21, 2010 Author Share Posted October 21, 2010 Thank you very much. It works now. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now