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

newforms error structure not well documented #115

Open
catskul opened this issue Sep 29, 2015 · 0 comments
Open

newforms error structure not well documented #115

catskul opened this issue Sep 29, 2015 · 0 comments

Comments

@catskul
Copy link

catskul commented Sep 29, 2015

I'll try to write up a PR for a documentation change when I get a moment.

It took me a while to figure out why my error dictionaries coming from Django and DRF were not working with newforms (I'd assumed since newforms was inspired by django it might 'just work'). Django and DRF both appear to return errors as:

{'fieldName' : [  'something bad happened', 'other bad thing']}

Where as newforms appears to expect errors to be of the form:

{'fieldName' : [ {
        'code' : 'some',
        'message': 'something bad happened',
    },
    {   'code' : 'other',
        'message': 'other bad thing',
    }
]}
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