1

Html5 form validation uses the browser (or os?) language, but I have an English website for mostly Duch users.
So all validation messages should be in English.

How can I change the language for these validation messages?

This is not a duplicate, I know I can set my own custom messages.
I don't need this, I just want to set the correct language, if that's possible.

Ruben
  • 8,956
  • 14
  • 63
  • 102
  • 1
    http://stackoverflow.com/a/10754847/1138214 – ArinCool Mar 12 '15 at 15:05
  • 1
    that's not the answer I need, it suggest a javascript solution, but I think it's also possible to just set the language (or at least it should) – Ruben Mar 12 '15 at 16:05

1 Answers1

1

Use the title tag to display the custom message:

 <input type="text" required title="Mijn aangepaste boodschap" />

EDIT

@Denis Chenu is right, this is not the correct solutions, this post has a correct javascript solution: changing the language of error message in required field in html5 contact form

So this is a duplicate and can be closed?

document.getElementById('fname').setCustomValidity('Dit is verplicht kut');
<form>
  <label for="fname">First name:</label><br>
  <input required type="text" id="fname" name="fname" title="Vul dit veld in kut"><br>
  <label for="lname">Last name:</label><br>
  <input required type="text" id="lname" name="lname">
  <button type="submit">Submit</button>
</form>
Ruben
  • 8,956
  • 14
  • 63
  • 102