Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upValidating subclasses #807
Closed
Labels
Comments
This comment has been minimized.
This comment has been minimized.
Might be possible to achieve this now using validator decorators. Please let us know whether or not you get it to work. I'd be happy to accept a PR to implement it out of the box if it's something multiple people want. |
This comment has been minimized.
This comment has been minimized.
Alright, I've been freeriding long enough. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Question
I was wondering what the best way to validate subclasses is?
Something along the sorts of
where I would expect both
to work, but
to throw an error.
Is the way to go to implement a custom type or is there a way pydantic supports this out-of-the-box?
Have a good weekend :)