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
Why do validators require three parameters (self, attribute, value)? Can't the value just be pulled from self? I am also failing to understand the use of the attribute parameter.
Sorry if this is an obvious question or this is an inappropriate discussion topic but I did some research and wasn't finding any good resources on this topic. Anyway, as a recent convert from dataclasses, thank you for developing such an awesome package.
The text was updated successfully, but these errors were encountered:
You can't pull value from self, because value isn't assigned to self until it has been validated. The attribute parameter allows you for certain meta programming things by, for instance, putting additional info into the meta field of an attribute and use that for validation. Adding a three-arg version of converters is in fact one of the most popular feature request ATM.
Why do validators require three parameters (
self
,attribute
,value
)? Can't thevalue
just be pulled fromself
? I am also failing to understand the use of theattribute
parameter.Sorry if this is an obvious question or this is an inappropriate discussion topic but I did some research and wasn't finding any good resources on this topic. Anyway, as a recent convert from dataclasses, thank you for developing such an awesome package.
The text was updated successfully, but these errors were encountered: