This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | Misleading error message for <input type="number" pattern=""> | ||
---|---|---|---|
Product: | web | Reporter: | _ gtzabari <gtzabari> |
Component: | HTML Editor | Assignee: | Milutin Kristofic <mkristofic> |
Status: | NEW --- | ||
Severity: | normal | ||
Priority: | P3 | ||
Version: | 8.0 | ||
Hardware: | PC | ||
OS: | Windows 7 | ||
Issue Type: | ENHANCEMENT | Exception Reporter: | 33.33 |
Description
_ gtzabari
2014-05-17 02:59:47 UTC
It turns out that Netbeans support <input pattern=""> but the error message is misleading. Given: <input id="price" type="number" placeholder="Price" pattern="^\\$?(([1-9](\\d*|\\d{0,2}(,\\d{3})*))|0)(\\.\\d{1,2})?$"> Netbeans warns: Attribute "pattern" not allowed on element "input" at this point. Expected behavior: The warning should explain that attribute "pattern" is not allowed because attribute "type" is already present. My understanding is that both tags should be allowed together. Or even are necessary to be together: "Note: The pattern attribute works with the following input types: text, search, url, tel, email, and password" http://www.w3schools.com/tags/att_input_pattern.asp As additional types can be defined, the error might just be too restrictively looking for a combination of "pattern" with one of the listed types. Which does not include "number". |