marshmallow
marshmallow copied to clipboard
Don't check for False return values from validators
Currently, validators are allowed to return False
which results in ValidationError
with a generic message.
https://github.com/marshmallow-code/marshmallow/blob/9ac3241b78b444033f901d51b431ac862d1e21cc/src/marshmallow/fields.py#L249-L251
I'm not convinced this behavior is that useful, and we could improve validation/deserialization performance by removing it. It also is a simpler API, avoiding confusion like in https://github.com/marshmallow-code/marshmallow/issues/1458
Slating this for 4.0 since it's a breaking change.
Yes.
Adding a link to the doc section you just added that should be reworded when dealing with this: https://github.com/marshmallow-code/marshmallow/pull/1774/files.