[Bug 10923] Add an attribute to override UA's validation message

http://www.w3.org/Bugs/Public/show_bug.cgi?id=10923

Ian 'Hixie' Hickson <ian@hixie.ch> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |WONTFIX

--- Comment #9 from Ian 'Hixie' Hickson <ian@hixie.ch> 2010-10-12 08:09:46 UTC ---
Well what would you do for, e.g., <input type=number> where there might be
multiple different errors? (too low, too high, not on step, missing, etc)? Or
<input type=text pattern required>, where it might be required or might not
match the pattern?

We'd need one attribute per possible UA message, and we don't know how many UA
messages there might be (e.g. the UA might also have different messages for
combinations of errors, like a date field that is both too low and not on
step).

The whole point of this feature is that the UA can do an excellent job of this,
whereas the authors of most pages really just want to mark the control as
required and not have to worry about it.

What I meant with respect to setCustomValidity() is that if you think you can
do a better job than the UA, then you would do all the checks oninput:

   <input type=text pattern="..." oninput="check(this)">

   function check(control) {
      if (it's a text control) {
         if (it's required but the value is missing) {
            control.setCustomValidity('yo bro you need a value here man');
         } else if (it's got a pattern and the pattern doesn't match) {
            control.setCustomValidity('you need to make sure to write things
correctly dude');
         } else {
            control.setCustomValidity('');
         }
      } else {
         ...
      }
   }

...and so on.


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: Rejected
Change Description: no spec change
Rationale: Requested feature seems redundant with existing features.

-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Tuesday, 12 October 2010 08:09:48 UTC