Recall & Review
beginner
What is the purpose of form validation styles in Bootstrap?
Form validation styles in Bootstrap help visually indicate to users whether their input is valid or invalid, improving user experience and accessibility.
Click to reveal answer
beginner
Which Bootstrap class adds a green border and check icon to a valid input field?The class
is-valid adds a green border and a check icon to indicate the input is valid.Click to reveal answer
beginner
Which Bootstrap class adds a red border and cross icon to an invalid input field?The class
is-invalid adds a red border and a cross icon to indicate the input is invalid.Click to reveal answer
beginner
How do you display a custom error message below an invalid input in Bootstrap?
Use a
<div> with the class invalid-feedback immediately after the input field to show a custom error message.Click to reveal answer
intermediate
What attribute should be added to a form to enable Bootstrap's custom validation styles?
Add the
novalidate attribute to the <form> element to disable native browser validation and use Bootstrap's custom styles.Click to reveal answer
Which class would you add to an input to show it is valid in Bootstrap?
✗ Incorrect
The
is-valid class applies green border and check icon to valid inputs.What class shows a red border and error icon for invalid inputs?
✗ Incorrect
The
is-invalid class styles inputs with a red border and error icon.Where should you place the
invalid-feedback element?✗ Incorrect
The
invalid-feedback element must be placed immediately after the input to show error messages properly.What does the
novalidate attribute do on a form?✗ Incorrect
The
novalidate attribute disables native browser validation so you can use custom Bootstrap validation.Which icon appears with
is-valid class in Bootstrap forms?✗ Incorrect
The
is-valid class shows a green checkmark icon to indicate valid input.Explain how to use Bootstrap classes to show valid and invalid form input states.
Think about the colors and icons that help users know if their input is correct.
You got /4 concepts.
Describe how to add custom error messages for invalid inputs using Bootstrap.
Where do you put the message and what class do you use?
You got /4 concepts.