-
Notifications
You must be signed in to change notification settings - Fork 238
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
Cerberus 2: Proposal to change the default_setter behaviour #438
Comments
related to #515 I mentioned that the functionally discussed in this issue would be very helpful. In my sub-classed validator I solved it by introducing a special
instead of always setting In case this approach is considered for cerberus I suggest however to have an equivalent of |
closing this issue as there are currently no intentions to continue a next major release. |
as #427 shows, the
default_setter
rule should be usable in a way that allows the used handler(s) to determine whether a field should be added to the document at all. therefore the proposed change is to delegate the responsibility of (not) adding a field to the document to the handler(s). currently it must return a value that is then set as the field's content in any case - though that can be prevented by raising an exception. #279 must be resolved as a requirement for this change.cc @andreymal, @dkellner
The text was updated successfully, but these errors were encountered: