We've been using this library for a few weeks and we're really liking it so far -- thank you!
There's one thing that keeps tripping us up: the MultipleModelField and ListFields (and maybe others) fail their validation if you pass an empty list. This is counterintuitive -- an empty list is still a list! You can work around it by setting required=False on the field, but then there's an ambiguity around whether the field is [] or None.
Would you be open to a PR that changed this behaviour such that empty lists are allowed?
It would likely break backwards compatibility if this behavior was changed. What about adding a new attribute called allow_empty which defaults to False (to maintain BC)?
We've been using this library for a few weeks and we're really liking it so far -- thank you!
There's one thing that keeps tripping us up: the
MultipleModelField
andListField
s (and maybe others) fail their validation if you pass an empty list. This is counterintuitive -- an empty list is still a list! You can work around it by settingrequired=False
on the field, but then there's an ambiguity around whether the field is[]
orNone
.Would you be open to a PR that changed this behaviour such that empty lists are allowed?