We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Custom validators don't seem to fire. I've followed the documentation on the wiki as well as tried various online solutions
from wtforms import Form, StringField from wtforms.validators import ValidationError class xyzForm(Form): name = StringField("name") def validate_name(form, field): # Using (self, field) or (self, form, field) also doesn't work print('fired') if len(field.data) > 2: raise ValidationError('blahblah')
Similarly, the following also doesn't work
from wtforms import Form, StringField from wtforms.validators import ValidationError def custom_val(form, field): print('fired') if len(field.data) > 2: raise ValidationError('blahblah') class xyzForm(Form): name = StringField("name", validators=[custom_val])
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Custom validators don't seem to fire. I've followed the documentation on the wiki as well as tried various online solutions
Similarly, the following also doesn't work
Environment
The text was updated successfully, but these errors were encountered: