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

https://www.w3.org/Bugs/Public/show_bug.cgi?id=19751

Robin Berjon <robin@w3.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |WORKSFORME

--- Comment #8 from Robin Berjon <robin@w3.org> ---
EDITOR'S RESPONSE: This is an Editor's Response to your comment. If you are
satisfied with this response, please change the state of this bug to CLOSED. If
you have additional information and would like the Editor to reconsider, please
reopen this bug. If you would like to escalate the issue to the full HTML
Working Group, please add the TrackerRequest keyword to this bug, and suggest
title and text for the Tracker Issue; or you may create a Tracker Issue
yourself, if you are able to do so. For more details, see this document:

   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Accepted
Change Description: none (this has already been fixed in the meantime)
Rationale:

This has been addressed while this discussion was taking place. Please consider
this note:

"""
Note: When a form is submitted, invalid events are fired at each form control
that is invalid, and then at the form element itself. This can be useful for
displaying a summary of the problems with the form, since typically the browser
itself will only report one problem at a time.
"""
--
http://www.w3.org/html/wg/drafts/html/master/forms.html#client-side-form-validation

and more importantly this normative requirement:

"""
If the submitted from submit() method flag is not set, and the submitter
element's no-validate state is false, then interactively validate the
constraints of form and examine the result: if the result is negative (the
constraint validation concluded that there were invalid fields and probably
informed the user of this) then fire a simple event named invalid at the form
element and then abort these steps.
"""
--
http://www.w3.org/html/wg/drafts/html/master/forms.html#form-submission-algorithm

What happens here is that when the form is submitted (using whatever method)
then its validity is assessed. If it is invalid, in addition to the invalid
events for each control, there is a final invalid event dispatched at the form
itself. So you can check what the event's target is and know that it was an
invalid event for the form itself.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Tuesday, 11 June 2013 11:20:42 UTC