Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

InputRequired(), the message para doesn't work #78

Closed
gainskills opened this issue Apr 7, 2018 · 1 comment
Closed

InputRequired(), the message para doesn't work #78

gainskills opened this issue Apr 7, 2018 · 1 comment

Comments

@gainskills
Copy link

gainskills commented Apr 7, 2018

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 messges field works, but InputRequired always shows the prompt: "Please fill out this field"

expectation:
parameter: message of InputRequired should works.

@gainskills
Copy link
Author

I checked wtf's parameter, it indeed gets message value, report an issue to flask-bootstrap instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant