Erik Nisler Posted June 26, 2020 Share Posted June 26, 2020 (edited) Hello, I would like to configure phone number in customer order. The problem is, sometimes customer fill less than 9 numbers. In my country, I need exact 9 numbers to fill in. Edited June 26, 2020 by Erik Nisler (see edit history) Link to comment Share on other sites More sharing options...
Knowband Plugins Posted June 28, 2020 Share Posted June 28, 2020 Through PS Admin, Interface its not possible. Through code changes, Its possible. For adding validation for 9 digits only, kindly add the below code in the end of file : themes/{your_theme}/templates/customer/_partials/address-form.tpl <script> $(window).load(function() { $('input[name="phone"]').attr("pattern", '^\s*(?:[0-9]{9})\s*$'); }); </script> Link to comment Share on other sites More sharing options...
Erik Nisler Posted June 29, 2020 Author Share Posted June 29, 2020 Nothing happened, I can still fill in random amount of numbers :-( 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