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

catch better error for duplicate values #134

Open
jvanasco opened this issue Oct 4, 2017 · 0 comments
Open

catch better error for duplicate values #134

jvanasco opened this issue Oct 4, 2017 · 0 comments

Comments

@jvanasco
Copy link
Contributor

jvanasco commented Oct 4, 2017

If a schema has a scalar field (such as text or email) and multiple items are submitted, Formencode will raise a Python exception instead of catching the python exception and making the field invalid.

for example, if formencode is leveraged in a website and multiple values are submitted as GET query arguments such as http://example.com?foo=bar&foo=biz, formencode will raise AttributeError: 'list' object has no attribute 'strip'.

I suggest formencode catch these exceptions and mark the field as invalid.

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