Skip to content

Files

Latest commit

 

History

History
13 lines (13 loc) · 933 Bytes

107.md

File metadata and controls

13 lines (13 loc) · 933 Bytes
title date submitter number tags discussion
I want native constraint validation messages to be translatable
2020-02-19 22:21:59 UTC
Guylian Cox
107
forms
internationalization

Browsers support many locales when displaying input constraint validation error messages, but they display them based on navigator.language. A common request from clients is to have them in the language of the website in order to have a unified experience (especially if there are custom error messages displayed in the language of the website). This, currently, means re-creating them based on input.validity. That solution is not all that great as browsers give information to the user that is not available in input.validity (such as what is missing in the email format). I'd love to be able to specify the language that validation messages should use in some way.