$custom-select-background:$custom-select-indicatorno-repeatright$custom-select-padding-xcenter/$custom-select-bg-size!default;// Used so we can have multiple background elements (e.g., arrow and feedback icon)
@@ -767,9 +767,9 @@ With that in mind, consider the following demos for our custom form validation s
...
@@ -767,9 +767,9 @@ With that in mind, consider the following demos for our custom form validation s
### Custom styles
### Custom styles
For custom Bootstrap form validation messages, you'll need to add the `novalidate` boolean attribute to your `<form>`. This disables the browser default feedback tooltips, but still provides access to the form validation APIs in JavaScript. Try to submit the form below; our JavaScript will intercept the submit button and relay feedback to you.
For custom Bootstrap form validation messages, you'll need to add the `novalidate` boolean attribute to your `<form>`. This disables the browser default feedback tooltips, but still provides access to the form validation APIs in JavaScript. Try to submit the form below; our JavaScript will intercept the submit button and relay feedback to you. When attempting to submit, you'll see the `:invalid` and `:valid` styles applied to your form controls.
When attempting to submit, you'll see the `:invalid` and `:valid` styles applied to your formcontrols.
Custom feedback styles apply custom colors, borders, focus styles, and background icons to better communicate feedback. Background icons for `<select>`s are only available with `.custom-select`, and not `.form-control`.
{% capture example %}
{% capture example %}
<formclass="needs-validation"novalidate>
<formclass="needs-validation"novalidate>
...
@@ -990,10 +990,18 @@ We recommend using client side validation, but in case you require server side,
...
@@ -990,10 +990,18 @@ We recommend using client side validation, but in case you require server side,
### Supported elements
### Supported elements
Our example forms show native textual `<input>`s above, but form validation styles are available for our custom form controls, too.
Our example forms show native textual `<input>`s above, but form validation styles are also available for `<textarea>`s and custom form controls.
{% capture example %}
{% capture example %}
<formclass="was-validated">
<formclass="was-validated">
<divclass="mb-3">
<labelfor="validationTextarea">Textarea</label>
<textareaclass="form-control is-invalid"id="validationTextarea"placeholder="Required example textarea"required></textarea>
@@ -241,6 +241,7 @@ You can find and customize these variables for key global options in Bootstrap's
...
@@ -241,6 +241,7 @@ You can find and customize these variables for key global options in Bootstrap's
| `$enable-grid-classes` | `true` (default) or `false` | Enables the generation of CSS classes for the grid system (e.g., `.container`, `.row`, `.col-md-1`, etc.). |
| `$enable-grid-classes` | `true` (default) or `false` | Enables the generation of CSS classes for the grid system (e.g., `.container`, `.row`, `.col-md-1`, etc.). |
| `$enable-caret` | `true` (default) or `false` | Enables pseudo element caret on `.dropdown-toggle`. |
| `$enable-caret` | `true` (default) or `false` | Enables pseudo element caret on `.dropdown-toggle`. |
| `$enable-print-styles` | `true` (default) or `false` | Enables styles for optimizing printing. |
| `$enable-print-styles` | `true` (default) or `false` | Enables styles for optimizing printing. |
| `$enable-validation-icons` | `true` (default) or `false` | Enables `background-image` icons within textual inputs and some custom forms for validation states. |