Input Form Validation

Enable input validation by adding the needs-validation class and initializing with novalidate. Combine this with Bootstrap styles and invalid-feedback for real-time validation.

Username must be at least 1 characters.
Validation with tooltip

Apply custom validation styles using needs-validation along with novalidate, and display feedback using invalid-tooltip inside a position-relative container.

Username must be at least 1 characters.
Custom styles

Apply custom validation styles using needs-validation, valid-feedback, and invalid-feedback classes with Bootstrap’s form-control and form-check utilities.

Looks good!
Looks good!
@
Please choose a username.
Please provide a valid city.
Please select a valid state.
Please provide a valid zip.
You must agree before submitting.
Browser defaults

Use browser's default validation by applying required attributes on form fields without custom JavaScript or additional needs-validation logic.

@
Server-side

Demonstrates server-side validation using is-valid and is-invalid classes for form feedback.

Looks good!
Looks good!
@
Please choose a username.
Please provide a valid city.
Please select a valid state.
Please provide a valid zip.
You must agree before submitting.
Supported elements

This example shows validation styles on various supported form elements including textareas, checkboxes, radios, selects, and file inputs.

Please enter a message in the textarea.
Example invalid feedback text
More example invalid feedback text
Example invalid select feedback
Example invalid form file feedback
Tooltips

Use valid-tooltip and invalid-tooltip classes to display validation messages as tooltips on form elements.

Looks good!
Looks good!
@
Please choose a unique and valid username.
Please provide a valid city.
Please select a valid state.
Please provide a valid zip.
Theme Customization
Layout:
Vertical
Horizontal
Semi Box
Content Width:
Default
Box
Layout Direction:
LTR
RTL
Layout Mode:
Light
Dark
System
Sidebar Size:
Default
Medium
Icon
Icon hover