Skip to content

Bootstrap5 Plugin

Applies Bootstrap 5 validation classes (is-valid / is-invalid) to form fields based on their validation state.

Options

OptionTypeDefaultDescription
validClassstring"is-valid"CSS class applied when the field is valid
invalidClassstring"is-invalid"CSS class applied when the field is invalid

Playground

Notes

  • Classes are added directly to the <input> element (not the wrapper <div>).
  • The Message plugin is recommended alongside Bootstrap5 to display error text.
  • On uninstall() (e.g., fv.destroy()), all classes are removed.

Released under the MIT License.