h5Validate
h5Validate copied to clipboard
Long form, scroll to error?
I'm very much a JS noob. I have the validation working, and I love the idea of this project - basically make the browser act like it truly supports html5 validation. :)
I have a very long form, that even on an iPad has form items out of view when hitting "submit". Is there a simple way to have the browser scroll up to where the first error exists?
Sure. You can listen for the formValidated event and scroll to the first element with an error. There is a jQuery plugin that will let you scroll to a selected element.