How can I change telephone field input type validation on check out onepage ?
Currently it takes input numeric with no space. I want to change it space with numbers
As an example,
current input format is: 1234567899999
But when i try this input format: 123 45468 99999
it is not working. What should I do to format this number?
Best Answer
Magento uses
Prototype library to manage form validation of input fields
. This comes in handy, because all youneed to do when writing custom form is to assign a valid class names
to your input fields, and pass the form id to VarienForm object.you need add
css class validate-phoneStrict
at field which will dothis type validation. you need to remove validate-number etc validation
You need see js field validation at js\prototype\validation.js
and you can also do below format: