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

Uncaught error when passing non-list validators to Email and URL fields #1400

sloria opened this issue Sep 15, 2019 · 1 comment


Copy link

commented Sep 15, 2019

fields.Email and fields.URL error if a non-list is passed to validate.

from marshmallow import Schema, fields, validate

class UserSchema(Schema):
    email = fields.Email(validate=(validate.Length(min=5), ))
    url = fields.URL(validate=(validate.Length(min=5), ))
AttributeError: 'tuple' object has no attribute 'insert'

This comment has been minimized.

Copy link
Member Author

commented Sep 15, 2019

Found this bug while typing and running mypy.

@sloria sloria closed this Sep 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
1 participant
You can’t perform that action at this time.