[whatwg] validationMessage

Aryeh Gregor Simetrical+w3c at gmail.com
Fri Feb 12 12:22:24 PST 2010


On Fri, Feb 12, 2010 at 1:40 AM, Peter Kasting <pkasting at google.com> wrote:
> I am explicitly opposed to the UA showing validation messages to the user.
>  I do not think HTML5 should attempt to address use cases where the author
> wants the UA to show the messages.

I strongly disagree.  Boilerplate browser-provided UI for common types
of requirements would be a really useful feature here.  It drastically
reduces the work needed for authors to do common types of validation
that are more complicated than "max" and "min", like type="email" and
such, and should improve correctness and user experience.  (Reference:
<http://img.thedailywtf.com/images/201002/errord/linkedinwtf.png>)

If authors wanted to write complicated scripts to do validation, they
could already do so.  One of the most important features here is that
you *don't* need to write any script to get a full validation system,
including UI.

On Fri, Feb 12, 2010 at 9:23 AM, Tab Atkins Jr. <jackalmage at gmail.com> wrote:
> When I use a jQuery validation plugin for my forms today, I pretty
> much always rely on the default error message that the library
> provides.  It's rare for me to override it; I typically only provide
> messages when I'm specifying a custom validation that doesn't have a
> message (as the default error message for a custom validation rule is
> far too generic).
>
> So yes, I'd use validationMessage in my own UI.  It's easier, as it
> lets me be completely agnostic about the actual error, and just plug
> in whatever the error is into my custom UI.

Okay -- I defer to your much greater experience in this realm.

> I don't know that I've ever seen a validated form rely solely on
> non-textual UI for anything, except possibly the failure to fill out a
> required field (and even then, there's a message somewhere on the page
> explaining that all the fields with a red border are required or
> whatever).
>
> If that were to happen, though, an artificial string would be
> appropriate.  Ian, do you think this needs to be explicitly stated?

It's probably not necessary unless a browser actually wants to do this.



More information about the whatwg mailing list