-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Closed
Labels
Description
Future improvements to the validate_assignment decorator #1179:
- arguments to the decorator, including: validators, custom config (partially fixed by Valdiate arguments config #1663), return value validation
- rewrite front page to explain the 3 or 4 primary interfaces to pydantic:
BaseModeldataclassesparse_obj_asvalidate_arguments
- perhaps change the error raised for invalid arguments to inherit from
TypeErroras other argument errors do. (Currently the normalValidationErroris raised which inherits fromValueError) - allow
validate_assignmentto be set in "strict" mode so types are not coerced, this is really just Strict configuration #1098 - option to enable or disable validation via an environment variable or similar - e.g. to only use the function in development or testing or on a subset of calls
- option to still call the function if validation fails
- get rid of the extra arguments to the underlying model so it's useful
- instance methods @validate_arguments on instance methods #1222
schneiderfelipe, thearrow, 9y2070m, lovetheguitar, hagelslagvier and 2 more