VOOZH about

URL: https://www.geeksforgeeks.org/bootstrap/bootstrap-5-validation-custom-styles/

⇱ Bootstrap 5 Validation Custom styles - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Bootstrap 5 Validation Custom styles

Last Updated : 2 Aug, 2024

Bootstrap 5 Validation Custom styles are used to add custom styles of bootstrap5 in your code. In order to add such custom styles we will have to add a novalidate boolean attribute to our <form>. After applying this attribute when you attempt to submit the form you can see the valid and invalid style of custom styles. Using custom styles we can add a variety of styles such as colors, borders, background icons, etc. If we want to add background icons then we can use <select>, they are only available with .form-select.

Bootstrap 5 Validation Custom styles attribute:

  • novalidate: This attribute is used to disable the browser's default feedback tooltips.

Syntax:

<form class="..." novalidate>
...
</form>

Example 1: let's see an example of validation custom styles. 

Output:

Example 2:  let's see another example of validation custom styles.

Output:

Comment

Explore