On the checkout shipping section the first and last name input fields have validation on them which doesn't accept hyphens (-) or ' characters

I had a look in lib/mage/validation.js but can't see where this validation criteria would be coming from

Does anyone know where this can be changed please? As if some has a double barreled name like Smith-San or O'leary it throws a validation error

  • Any extension related to customer then it's create issue. Sep 20, 2019 at 5:17

1 Answer 1


Not a great answer but I wanted to share screenshots with you.

My best advice is to check the markup on the fields. Check for either validation classes or knockout bindings. Might give you an idea on what is happening.

But as you can see from screenshot default behaviour is just to have first name, last name as required fields. On that basis I was able to add address with criteria you posted. No further validation.

enter image description here

enter image description here

  • Ahh I see thanks for the reply! it looks like the site I'm on has some funky custom validation going on somewhere then
    – No Dachi
    Sep 19, 2019 at 22:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.