Skip to content

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

Closed
wants to merge 734 commits into from
Closed

Extend form docs with example form errors #18704

wants to merge 734 commits into from

Conversation

tordans
Copy link
Contributor

@tordans tordans commented Dec 27, 2015

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:
bildschirmfoto 2015-12-27 um 14 51 49

@@ -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.
Copy link
Collaborator

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]

@cvrebert
Copy link
Collaborator

@mdo The existence of .text-help contradicts the statement in http://v4-alpha.getbootstrap.com/components/forms/#help-text that "No official help text classes exist in Bootstrap 4". Could we get a ruling on which is supposed to be correct here?

@mdo mdo added this to the v4.0.0-alpha.3 milestone Feb 9, 2016
mdo added a commit that referenced this pull request Feb 9, 2016
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.
mdo added a commit that referenced this pull request Feb 9, 2016
- Give some guidance on when someone might use any of the three
validation states. Fixes #18702.

- Improve the examples to provide examples of supporting validation
text with the new `.form-control-feedback`, as well as always-present
help text. Nullifies #18704.
@mdo mdo mentioned this pull request Feb 9, 2016
5 tasks
TiGR and others added 22 commits February 16, 2016 08:20
This one was overlooked at edit

See #17719 and #19199
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
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]
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]
cvrebert and others added 27 commits April 10, 2016 19:09
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]
[ci skip]
.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]
Modal: Remove IE8-specific window.innerWidth workaround
…isation

Suppress IE/Edge additional white/blue colors for focused <select>
@twbs-rorschach
Copy link

Hi @tordans!

Thanks for wanting to contribute to Bootstrap by sending this pull request!
Unfortunately, your pull request seems to have some problems:

You'll need to fix these mistakes and revise your pull request before we can proceed further.
Once you've fixed these problems, you can either ask the maintainers to re-open this pull request, or you can create a new pull request.
Thanks!

(Please note that this is a fully automated comment.)

@mdo mdo mentioned this pull request May 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.