[whatwg] HTML 5 clarifications on ValidityState?
Ian Hickson
ian at hixie.ch
Mon Aug 31 02:04:11 PDT 2009
On Tue, 25 Aug 2009, Alex Vincent wrote:
>
> I read this paragraph (from section 4.10.15.3) as self-contradicting:
>
> "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.
Fixed.
> Also, I noticed the readonly attribute for input elements overrides
> constraint validation, per section 4.10.4.2.3 - but the readonly
> attribute has no meaning for several input types (section 4.10.4, the
> big table after the IDL). For checkboxes, radio buttons, file uploads,
> image inputs, submit, reset and ordinary button types for the input
> element, readonly has no other effect.
>
> Please advise - I'm currently working on a patch for Gecko code which
> implements this.
If the attribute doesn't apply, the text in that section is irrelevant.
Does that help?
--
Ian Hickson U+1047E )\._.,--....,'``. fL
http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,.
Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'
More information about the whatwg
mailing list