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 has been archived by the owner on Feb 17, 2023. It is now read-only.
The "sanitized_object" attribute has to be reset since the validation has failed otherwise it will be in an inconsistent state.
Actually, after a quick fresh look at the code I think the defect found its root an OO design flaw. The validator should be a functor with its own class hierarchy instead of a method inside the "schema" hierarchy. Having the validator and the schema melt together in one single hierarchy class breaks the principle of separating the code from the data. In our case the Schema is the data and the validator is the code.
Assuming we have these two concepts (validator and schema) separated in their class hierarchy, we can still keep the "sanitized_object" attribute for convenience. But then I think the chunk of code mentioned above will appears only once in the code and the duplication will gone.
This chunk of code is duplicated in many places:
The text was updated successfully, but these errors were encountered: