Prohibit null characters in CharField by default by jleclanche · Pull Request #6073 · encode/django-rest-framework (original) (raw)
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is more prone to breaking, but we're depending on the behavior that Django provides. If the behavior changes, it helps to know about it.
I wanted to test against the code (null_characters_not_allowed) but I don't think DRF exposes it, does it?
Hm. I'm not entirely sure how Django and DRF ValidationError
s interact at the moment in regards to the error code. I know some changes to ErrorDetail
were made in #5785, but idk if this is easily testable at the field level, or if the error code is preserved.