Flash error message not displaying the background colour in Flask. Why?

816 views Asked by At

Why is the category error of Flask flash messages not working for me?

flash('Error message', category='error')

I get the following invisible background instead of the red one. What could be the reason?

enter image description here

Other info

Using all the other known categories ('success', 'info', 'warning') works pretty fine for me: I always get the correct message with the correct color:

enter image description here

enter image description here

enter image description here

1

There are 1 answers

0
Nadiantara I Wayan On BEST ANSWER

You should use "danger" category instead of "error". For example:

flash('Login Unsuccessful. Please check your email and password', 'danger')