[whatwg] Form Validity Ambiguity - patternMismatch
pecoraro at apple.com
Mon Apr 19 23:19:02 PDT 2010
The section describing the pattern attribute does not explain that
it only applies to particular input types .
However, one of the tables showing which content attributes apply
to which input types shows the pattern attribute only applies to
particular input types. Namely text, search, url, telephone, email,
and password but not dates, times, numbers, hidden and others:
This disconnect could lead to ambiguous implementations of
ValidityState's patternMismatch which is simply described in
multiple places as:
When a control has a value that doesn't satisfy the pattern
returns true if the element's value doesn't match the provided
pattern; false otherwise.
These two definitions of patternMismatch do not mention that
they only apply on input type's that the pattern attribute applies
to. If that is the case then I recommend clarifying that constraint
in the description of the pattern attribute  and when describing
patternMismatch . If that is not that the case then I don't
see the purpose of the table showing that the "pattern" attribute
only applies to particular input types, and I would like clarification
there (like the row being removed or all checkboxes?) .
This may also apply to other validity states as well, I haven't
checked others yet.
More information about the whatwg