W3C home > Mailing lists > Public > public-html-bugzilla@w3.org > October 2012

[Bug 19751] Constraint Validation - Add a means of detecting invalid form submissions

From: <bugzilla@jessica.w3.org>
Date: Tue, 30 Oct 2012 02:03:12 +0000
To: public-html-bugzilla@w3.org
Message-ID: <bug-19751-2486-xSBHEWkIsl@http.www.w3.org/Bugs/Public/>

--- Comment #2 from TJ VanToll <tj.vantoll@gmail.com> ---
(In reply to comment #1)

> > At the moment you have to listen for anything that might trigger a
> > submission (usually clicks of submit buttons) and run the appropriate logic
> > there.  I give concrete code on how I've implemented this here
> > http://tjvantoll.com/2012/08/05/html5-form-validation-showing-all-error-
> > messages/.
> > 
> > While this works it is not ideal.  An event fired on the form whenever a
> > form submission was attempted and failed (much like invalid on form
> > elements) would make the implementation much simpler.
> This is quite simple actually. See this example:
> http://software.hixie.ch/utilities/js/live-dom-viewer/?saved=1870

The issue with this approach is that the logic will run once per invalid field
on the form.  If you give an invalid email address in your example you'll end
up with two alerts.  Unless I'm missing something there's no way to run the
logic just one time per attempted submission with the current API.

You are receiving this mail because:
You are the QA Contact for the bug.
Received on Tuesday, 30 October 2012 02:03:13 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 16:31:34 UTC