Skip to content
This repository has been archived by the owner on Feb 1, 2022. It is now read-only.

E042 when <input> has no type attribute shouldn't call the <input> non-textual #372

Open
Federico-G opened this issue Apr 6, 2016 · 4 comments
Labels

Comments

@Federico-G
Copy link

Error message:
.form-control cannot be used on non-textual <input>s, such as those whose type is: file, checkbox, radio, range, button

https://www.w3.org/TR/html5/forms.html#the-input-element
The missing value default is the Text state.

https://www.w3.org/TR/html4/interact/forms.html#h-17.4
This attribute specifies the type of control to create. The default value for this attribute is "text".

If I write an input tag without a type, this error should not be trigger, does it?

@cvrebert
Copy link
Collaborator

cvrebert commented Apr 6, 2016

This is a limitation of Bootstrap's .form-control class as opposed to the HTML standard.
See http://getbootstrap.com/css/#callout-input-needs-type

See also https://github.com/twbs/bootlint/wiki/W017 , which is only a warning rather than an error precisely because of the HTML spec sections you cited.

@cvrebert cvrebert closed this as completed Apr 6, 2016
@Federico-G
Copy link
Author

Ok, I agree with that, but bootlint never raised me that warning. The only message that I got was the E042 error.

Digging a bit, in v0.14.2 the W017 warning was not created, that is the version that I get from the javascript browser request.

Thanks

@cvrebert
Copy link
Collaborator

cvrebert commented Apr 6, 2016

Hmm, it is confusing for the message to call the input non-textual when it is implicitly textual.
We should ought to emit a clearer message in that case.

@cvrebert cvrebert reopened this Apr 6, 2016
@cvrebert cvrebert added bug and removed invalid labels Apr 6, 2016
@cvrebert cvrebert changed the title E042 when tag input do not have an explicit type E042 when <input> has no type attribute shouldn't call the <input> non-textual Apr 6, 2016
@uidsouffle
Copy link

Not sure if I should add as a separate issue or not, but this error also fires when type = "password" which, while masked, is still a text input. The Bootstrap documentation for 3 and 4, shows examples of , which would indicate this is an incorrect error response.
https://getbootstrap.com/docs/3.3/css/#forms

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants