[whatwg] [WebForms2] custom form validation notifications

On Wed, Nov 12, 2008 at 1:15 AM, Ian Hickson <ian at hixie.ch> wrote:
> On Thu, 23 Oct 2008, Eduard Pascual wrote:
>> [...]
> I don't really follow.
Neither do I, and I wrote that :S

Re-reading the conversation, I'm not really sure if I really
understood Joao's issue and proposal correctly; and without him
providing any clarification this doesn't turn any better... And, in
addition, I couldn't have worded my ideas worse than I did. It seems
that I got a "404 Brain not found" while writting that message.

Summarizing, my suggestion (a possible solution for what I thought to
be the main use-case for this) was to *not* include the
validation-related arguments in the markup (or use "catch-all"
placeholders), but instead add them from a script upon the page's
onload event. This way, when scripts are available, the javascript
will do whatever it needs, customize everything, and so on; but when
scripts are disabled or not supported, the client won't do anything,
and all the validation will be delegated to the server (that's what is
called *graceful* degradation, in contrast with "grace-less" stuff
like "<noscript>You have no scripting: your browser sux, get a new
one</noscript>" :P )

>> OTOH, I think Joao's idea was more like to relying on visual hints (ie:
>> marking the field as red) on cases where an error message popup would be
>> redundant and annoying. I think that could be more elegantly handled
>> with an empty attribute value for an hipothetical "custom-error-message"
>> attribute (which is not the same as an absent attribute).
> I really don't follow this. Maybe some concrete examples showing the
> problem with the current spec solutions would help.

The main point is that when a page already handless error-reporting
via CSS (for example, marking valid fields in green and invalid ones
in red), further notifications by the UA are redundant and sometimes
(if they take the form pop-up messages) annoying to the user. The need
would be to disable such messages even when scripts are not available.
I don't really know if there is a way to do that with the current
Anyway, as long as browsers don't use pop-ups for this kind of
notification, this shouldn't be an issue. Most browsers already
provide pop-up blocking functionality, so I hope they won't add
pop-ups of their own needlessly. In addition, a user that sees a field
becomming red (or marked as "invalid" in some other way) isn't likely
to hit the "submit" button before fixing it, so I don't think this is
too much of an issue anyway. Maybe Joao had something else in mind, or
some specific use-case, but unless he can provide more details, I
think this discussion will lead nowhere.

Eduard Pascual

Received on Wednesday, 12 November 2008 17:28:21 UTC