mbr / flask-bootstrap

Ready-to-use Twitter-bootstrap for use in Flask.
http://pypi.python.org/pypi/Flask-Bootstrap
Other
1.57k stars 724 forks source link

InputRequired(), message para value was not refered #179

Open gainskills opened 6 years ago

gainskills commented 6 years ago

WTForms (2.1) Flask-WTF (0.14.2) Flask-Bootstrap (3.3.7.1) Flask (0.12.2)

I define the login form by:

class LoginForm(FlaskForm):
    username = StringField('username', validators=[InputRequired(
        message="enter the username"), Length(min=6, max=16, message="Length should be more than 6 and less than 15")])
    <---ommited--->

route.py return the render html page, and the page was implemented by wtf.quick_form.

result: Length messages field works, but InputRequired always shows the prompt: "Please fill out this field"

expectation: parameter: the message of InputRequired should be loaded.