Please any Ideas on how to translate the validation message on phone field on view/frontend/layout/checkout_index_index.xml:

<item name="telephone" xsi:type="array">
   <item name="validation" xsi:type="array">
      <item name="validate-phoneStrict" xsi:type="boolean">true</item>
   <item name="config" xsi:type="array"> 
      <item name="tooltip" xsi:type="boolean">false</item>

The validate-phoneStrict validator take the message in lib/web/prototype/validation.js line 528-530

['validate-phoneStrict', 'Please enter a valid phone number (Ex: 123-456-7890).', function(v) {....

Validation work well but, translation doesn't work....Please help me to have right process to translate validation message of this validation rule.

Thank you.

  • where did you add the translation?
    – Diana
    Commented Mar 17, 2021 at 15:15
  • you mentioned it doesn't work
    – Diana
    Commented Mar 17, 2021 at 16:00

1 Answer 1


I have checked your query.

FYI :- If we use "validate-phoneStrict" validation for telephone it will show us error message like https://prnt.sc/10p00v3

So you can translate below message from your theme. Here is my theme path app/design/frontend/Megnor/mag110236_3/i18n/es_ES.csv.

"Please enter a valid phone number. For example (123) 456-7890 or 123-456-7890.","Por favor ingrese un número de teléfono válido. Por ejemplo (123) 456-7890 o 123-456-7890."

I have translated message for es_ES(Spaish) locale. You can change according to your need.

Please run static deploy command to see your changes effect on front end.

Please check and let me know if you have any query.

  • It's ok now. I set right string and everthing run well. Thank You Commented Mar 19, 2021 at 18:29

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.