Allowed attribute values (attribute-allowed-values
)
Validates attributes for allowed values. Use element-required-attributes tog validate presence of attributes.
The requirements comes from the element metadata:
{
"input": {
"attributes": {
"type": ["text", "email", "..."]
}
}
}
Rule details
Examples of incorrect code for this rule:
<a href>...</a>
<input type="foobar">
Examples of correct code for this rule:
<a href="page.html">...</a>
<input type="text">