Manuel Moreno Manuel Moreno - 4 months ago 7
HTML Question

HTML type="email" error message language change

How do you change the language of the default error message you get with type="email"?

Answer

You can use HTML oninvalid Event Attribute

<form>
<input type="email"  required oninvalid="this.setCustomValidity('Por favor, introduce una dirección de correo electrónico válida')"/>
<input type="submit"/>
</form>

Result

enter image description here

Comments