Bootstrap: Form validation classes has-danger/form-control-danger stop working after update from alpha to beta.

Created on 12 Sep 2017  路  4Comments  路  Source: twbs/bootstrap

I was using has-danger/form-control-danger classes documented here to have the visual effect of validation on inputs (it shows a nice icon in the field).

After updating to beta, those classes stop to work and I couldn't see any red borders or icons on my inputs. Reading the new 4.0 documentation I couldn't find the classes aforementioned, but a new is-invalid class. That works showing the red border but doesn't show the icon on the input.

Not sure why those classes were removed.

Is there a way to use the has-danger/form-control-danger on the beta version?

css v4

Most helpful comment

Jesus Christ!
Update the documentation!
I spent ages tearing my hair out as to why this wasn't working.

All 4 comments

You can read more about that on this issue #22762

Jesus Christ!
Update the documentation!
I spent ages tearing my hair out as to why this wasn't working.

Could you please specify what was the outcome (why is this issue closed)? From the linked issue, it is not clear at all whether you decided to stop with this functionality or whether you are still fixing it. (Icons are not the problem!) I am completely with shrosterneduryden - lost a lot of time with this.

@shrosterneduryden @katrinluethi See https://github.com/twbs/bootstrap/pull/22395 for full context on the change鈥攖hat's the PR where we introduced the new form validation method. Independent of the wrong issue/PR being referenced here, you need to be mindful of the release you're using, the docs matching that version of the docs, and you need to read the migration docs page.

Was this page helpful?
0 / 5 - 0 ratings