Flask-Validator
Flask-Validator copied to clipboard
Custom flash message with flask-validator
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.