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

Add max_length feature to StringField-like fields #216

Closed
wants to merge 3 commits into from
Closed

Add max_length feature to StringField-like fields #216

wants to merge 3 commits into from

Conversation

lafrech
Copy link
Member

@lafrech lafrech commented Mar 4, 2016

What do you think about such a feature?

The idea is to pass max_length to the call to the field so that max_length appears in the input field in the HTML code.

Client pre-validation is nice. I'd like to go even further with #214.

@lafrech lafrech added this to the 0.9 milestone Mar 9, 2016
@@ -6,20 +6,24 @@
import sys

from wtforms import widgets
from wtforms.fields import SelectFieldBase, TextAreaField, StringField
from wtforms import fields as f
Copy link

@gukoff gukoff Aug 5, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why?
It is nothing of consequence to import directly everything you want. It won't impact potential cycle imports because of how you are using these fields.
What is much worse is the one-letter variable.

@wojcikstefan
Copy link
Member

IMHO, this looks much hackier than it should. There has to be a better way to do it.

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

Successfully merging this pull request may close these issues.

None yet

3 participants