-
-
Notifications
You must be signed in to change notification settings - Fork 79.1k
Extend form docs with example form errors #18704
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -551,6 +551,8 @@ Block help text—for below inputs or for longer lines of help text—can be eas | |||
|
|||
Bootstrap includes validation styles for danger, warning, and success states on form controls. To use, add `.has-warning`, `.has-danger`, or `.has-success` to the parent element. Any `.form-control-label`, `.form-control`, and `.text-help` within that element will receive the validation styles. | |||
|
|||
This makes `.text-help` the right choise to display error messages in your forms. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Spelling: "choice", not "choise" [sic]
@mdo The existence of |
Uses a new more specific class, adds some basic spacing, and clarifies that this class is only for validation feedback. Clears up the help text class question in #18704 (comment) and addresses the vertical spacing in #18703.
Fix docs for new naming of .btn-outline [skip sauce]
[skip sauce] [skip validator]
Extract new $modal-dialog-margin variable
[skip sauce] [skip validator]
Extract $modal-dialog-sm-up-margin-y variable
[skip sauce] [skip validator]
Extract $modal-{header,footer}-border-width variables
[skip sauce] [skip validator]
Extract $modal-content-border-width variable
[skip sauce] [skip validator]
[skip sauce] [skip validator]
[skip sauce] [skip validator]
Extract $label-padding-{x,y} variables
[skip sauce] [skip validator]
[skip sauce] [skip validator]
Extract $label-pill-padding-x variable
[skip sauce] [skip validator]
[skip sauce] [skip validator]
…customized independently of $state-warning-bg [skip sauce] [skip validator]
Extract $dropdown-min-width variable
…or each breakpoint (as opposed to maximums) [ci skip]
Refs #12078 [skip sauce]
https://crbug.com/273306 has been fixed [skip sauce]
Update remaining Edge issue URLs in Wall of Browser Bugs
Update 300ms click delay docs to reflect iOS 9.3 improvements
[ci skip]
Due to the lack of this feature in browsers, we currently have to implement an annoying setTimeout-based workaround, which adds an extra layer of complication and probably slightly impacts performance: https://github.com/twbs/bootstrap/blob/e391fcb953cc959ddd88fb676b68f49eef85ef06/js/src/util.js#L63-L77 [ci skip]
Add http://bugzil.la/1264125 to Wall of Browser Bugs [ci skip]
Refs #12536 [ci skip]
Remove https://webkit.org/b/128489 from Wall of Browser Bugs
.navbar-divider width: 1px=>$border-width
remove `/` in reference url (otherwise 404s)
…tps://webkit.org/b/156687 These bugs are factors in our decisions regarding which unit to use in our media queries. Refs #17403 [skip sauce]
Add Wall of Browser Bugs entries for WebKit media query bugs [skip sauce]
[skip validator]
Modal: Remove IE8-specific window.innerWidth workaround
…isation Suppress IE/Edge additional white/blue colors for focused <select>
Hi @tordans! Thanks for wanting to contribute to Bootstrap by sending this pull request! You'll need to fix these mistakes and revise your pull request before we can proceed further. (Please note that this is a fully automated comment.) |
Forms should show a error message whenever there is an error. This can be done nicely in bootstrap with the
.text-help
class. But until know people hat to figure that out by themselves.This commit extends the example html with dummy error messages for the warning and danger cases. It also shows a case where a text-help paragraph is combined with an text-muted paragraph, wich requires an additional
m-b-0
at the moment (see #18703).In addition to that I extended the introduction to specify the
.text-help
class as the right way to show error messages in general. The.text-help
is not explained in the form-docs yet, but it should.This is what the new docs look like:
