I have a Flask-WTF form with with DataRequired
validators and related error messages. However, the Chrome browser seems to ignore my error messages and just displays "Please fill out this field". How do I get Flask to override this and show my messages?
from flask_wtf import FlaskForm
from wtforms import StringField, PasswordField, SubmitField
from wtforms.validators import DataRequired
class SignupForm(FlaskForm):
first_name = StringField('First Name', validators=[DataRequired(message='Hey, put in your first name!')])
last_name = StringField('Last Name', validators=[DataRequired("What, you can't remember your last name?")])
email = StringField('Email', validators=[DataRequired('Gonna need your email address!')])
password = PasswordField('Password', validators=[DataRequired('Really need a password, Dude!')])
submit = SubmitField('Sign Up')