Validates usage of input attributes (
<input> element uses the
type attribute to set what type of input field it is.
Depending on what type of input field it is many other attributes is allowed or disallowed.
For instance, the
step attribute can be used with numerical fields but not with textual input.
This rule validates the usage of these attributes, ensuring the attributes are used only in the proper context.
See HTML5 specification for a table of attributes and types.
Examples of incorrect code for this rule:
<input type="text" step="5">
Examples of correct code for this rule:
<input type="number" step="5">
- v4.14.0 - Rule added.