0

I would like to set up the message tip of a required field in html5

<html lang="en">

<input type="email" required="required" />

The message tip keeps on being labeled in french. I don't know which variable cause the browser to choose any language.

Isn't there a way to handle the html5 interaction languages smoothly (without JS)? I expected the langattr to be sufficient...

Yako
  • 3,405
  • 9
  • 41
  • 71

1 Answers1

0

Had the same problem

Actually, you shoud use JS to achieve that. On another hand, you could recompile your browser from source and change manually texts that are not in your desired language if you absolutely do not want to use JS.

Yes, you should use

setCustomValidity("Votre Custom Mensaje Naturlish");

whithin an oninvalid handler function attached to the input element.
Something like:

<input type="email" oninvalid="handlerToCall(this)" required="required" />

Here you'll find answers that are valid and do work for what you want to do. Try the jsfiddle live examples and you'll see for yourself :)

Community
  • 1
  • 1
1111161171159459134
  • 1,216
  • 2
  • 18
  • 28