Bootstrap Form Validation
Bootstrap provides validation states — valid (green) and invalid (red) — for form controls. Trigger them by adding .was-validated to the <form> element or by manually adding .is-valid / .is-invalid to individual controls.
Custom Feedback Messages
Add .valid-feedback or .invalid-feedback elements after the input to show contextual messages. They are hidden until the appropriate state class is active.