Flask-Validator icon indicating copy to clipboard operation
Flask-Validator copied to clipboard

Custom flash message with flask-validator

Open SleeveShirtholes opened this issue 6 years ago • 0 comments

I'm trying to use Flask-Validator with flask flash and I am wanting to show a specific message depending on what field failed. Is there currently a way to do this?

For example, I have two fields that have validation. One field is email and the other is regex and needs to follow a certain format. If the user enters the email wrong but the other field right, I only want to flash the message about wrong email format. If they get both wrong then flash both messages.

Hopefully this makes sense.

SleeveShirtholes avatar Nov 18 '19 22:11 SleeveShirtholes