.has-success
or
.has-danger
class to the field container based on the field validity. The field element will be added
.is-valid
or
.is-invalid
class.
/* The color of error message */
.fv-help-block
{
color
:
#dc3545
;
}
/* The color of valid icon */
.has-danger
.fv-plugins-icon
{
color
:
#dc3545
;
}
/* The color of invalid icon */
.has-success
.fv-plugins-icon
{
color
:
#28a745
;
}
.my-form
.fv-plugins-bootstrap
.fv-help-block
{
color
:
#f39c12
;
}
.my-form
.fv-plugins-bootstrap
.has-danger
.fv-plugins-icon
{
color
:
#f39c12
;
}
.my-form
.fv-plugins-bootstrap
.has-success
.fv-plugins-icon
{
color
:
#18bc9c
;
}
rowValidClass
and
rowInvalidClass
options which take the following default values:
| Plugin | rowValidClass | rowInvalidClass |
|---|---|---|
| Bootstrap plugin |
has-success
|
has-danger
|
| Bootstrap3 plugin |
has-success
|
has-error
|
| Bulma plugin |
fv-has-success
|
fv-has-error
|
| Foundation plugin |
fv-row__success
|
fv-row__error
|
| Materialize plugin |
fv-valid-row
|
fv-invalid-row
|
| Milligram plugin |
fv-valid-row
|
fv-invalid-row
|
| Mini plugin |
fv-valid-row
|
fv-invalid-row
|
| Mui plugin |
fv-valid-row
|
fv-invalid-row
|
| Pure plugin |
fv-has-success
|
fv-has-error
|
| Semantic plugin |
fv-has-success
|
error
|
| Shoelace plugin |
input-valid
|
input-invalid
|
| Spectre plugin |
has-success
|
has-error
|
| Tachyons plugin |
green
|
red
|
| Turret plugin |
fv-valid-row
|
fv-invalid-row
|
| Uikit plugin |
uk-form-success
|
uk-form-danger
|
.my-field-error
.fv-plugins-message-container
,
.my-field-error
.fv-plugins-icon
{
color
:
#ff0039
;
}
.my-field-success
.fv-plugins-message-container
,
.my-field-success
.fv-plugins-icon
{
color
:
#2780e3
;
}
FormValidation
.
formValidation
(
document
.
getElementById
(
'demoForm'
)
,
{
fields
:
{
...
}
,
plugins
:
{
tachyons
:
new
FormValidation
.
plugins
.
Tachyons
(
{
rowInvalidClass
:
'my-field-error'
,
rowValidClass
:
'my-field-success'
,
}
)
,
}
,
}
)
;