helloflask / bootstrap-flask

Bootstrap 4 & 5 helper for your Flask projects.
https://bootstrap-flask.readthedocs.io
Other
1.1k stars 189 forks source link

Message for successful validation of separate fields #291

Open phoenfrisur opened 1 year ago

phoenfrisur commented 1 year ago

Dear all,

I've some trouble sending a message to the browser when the field validation succeeded, like the "Looks good!" message in https://getbootstrap.com/docs/5.0/forms/validation/#custom-styles that appears underneath the field after submitting the form.

It seems to me that I just need to find a way to include this div underneath the <input> tag:

<div class="valid-feedback">
    Looks good!
</div>

I use the render_form method

{{ render_form(form, 
               button_style='success', 
               button_size='block', 
               novalidate=True}}

Many thanks, Christoph