1

Is there a way to show custom HTML5 form validation errors on load form?

dani herrera
  • 48,760
  • 8
  • 117
  • 177
  • Please clarify: do you want to show custom error messages, or the HTML5 error messages? – robertc Jan 25 '13 at 16:47
  • This might help you: http://stackoverflow.com/questions/10361460/how-can-i-change-html-5-form-validation-errors-default-messages – Tjoene Jan 25 '13 at 16:48

1 Answers1

1

check this one out: http://www.w3.org/html/wg/drafts/html/master/forms.html#dom-cva-setcustomvalidity

object.setCustomValidity(error)

sample: http://jsfiddle.net/makque/DQvsH/

I have issues with the type="email" myself, since it still accepts input like you@mail as a valid email address, thanks for the question.

[edited] I don't get it, but like this? http://jsfiddle.net/makque/wk4HY/

makque
  • 191
  • 2
  • 5