insin / insin/newforms

newforms error structure not well documented

Open
#115 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
634
Forks
46
PR merge metrics
No merged PRs in 30d

Description

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',
}
]}
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.