Skip to content

input-attr-applicability ​

Detect attributes that don't apply to the input type.

Severity ​

warning

❌ Incorrect ​

html
<input type="number" pattern="[0-9]+">

✅ Correct ​

html
<input type="text" pattern="[0-9]+">

Reference ​

Configuration ​

json
{
  "rules": {
    "input-attr-applicability": "error"
  }
}

Released under the MIT License.