Submit HTML5 Form using Javascript and validate its inputs

Viewed 24618

I'm writing form and adding html5 validation attributes to its input like "required", "autofocus". I use Javascript to submit the form using document.myForm.submit() but it doesn't validate the form against the html5 validation attributes as they aren't there.

Any Suggestions?

3 Answers
Related