You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 10, 2023. It is now read-only.
This would allow variable arguments for serialize, deserialize, and validate methods. This is to faciliate cases where Field serialization, deserialization, and validation is dependent for example on the parent model.
We could either do it based on the number of arguments (1) or based on the argument names (2).
For example (1):
# If there is only a single parameter then pass the valuevalidate(value)
# If there is two parameters pass the value and the current modelvalidate(value, model)
# If there is three parameters pass the value, the current model, and the parent model?validate(value, model, parent_model)
For example (2):
# Detect the argument names so all the above would be possible, as well asvalidate(value, parent_model)
validate(model, value)
# etc...
The more important question is perhaps what we would like to be passed. Is it the Model instance that is in the process of being deserialized (pre normalization). Or the Model class, or perhaps either or?