[whatwg] HTML 5 clarifications on ValidityState?

On Tue, Aug 25, 2009 at 12:50 AM, Alex Vincent <ajvincent at gmail.com> wrote:

> "The validationMessage  attribute must return the empty string if the
> element is not a candidate for constraint validation or if it is one
> but it satisfies its constraints; otherwise, it must return a suitably
> localized message that the user agent would show the user if this were
> the only form with a validity constraint problem. If the element is
> suffering from a custom error, then the custom validity error message
> should be present in the return value."
>
> Specifically, the last sentence contradicts the rest of the paragraph.
>  If there is a custom error, but the element is not a candidate for
> constraint validation, should the validationMessage attribute be
> empty, or should the custom validity error message be present in the
> return value?  You can't have both.


I believe the intent is that an element which is not a candidate for
constraint validation cannot be suffering from a custom error (just as it
cannot be suffering from any other validation error).  However, I'm not sure
why elements which are barred from constraint validation (fieldset, output)
have a setCustomValidity() method; perhaps so that authors could blindly
iterate over all form-associated elements and call this method?

PK
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20090825/103ab564/attachment.htm>

Received on Tuesday, 25 August 2009 10:53:57 UTC