[imps] Forms Constraint Validation : validationMessage

Mounir Lamouri mounir.lamouri at gmail.com
Fri Mar 12 09:57:32 PST 2010


The specs say, when the element is candidate for constraint validation
and doesn't satisfy its constraints, the validationMessage 'must return
a suitably localized message that the user agent would show the user
[...]' and when the element suffers form a custom error it should be the
return value.

As I understand it, that means :
if (IsCandidateForConstraintValidation())
  if (!IsValid())
    if (IsSufferingFromCustomMessage())

But the 'ShowMessage()' is not clearly defined. If the element is
suffering from more than one error, according to the specs, if one of
them is custom error, the function should return the custom error string
but if the element is suffering from more than one error and none of
them is the custom error what should be the error string ?

I think UA are going to return a message that will correspond to only
one of the constraint errors, classifying themselves the errors. As far
as I can tell Webkit is doing that.
So, should the specifications set a prioritized list of errors to return
or should it be UA specific ?



More information about the Implementors mailing list