Create a custom Pydantic class requiring value to be in an interval?
I’m working to build a function parameter validation library using pydantic
. We want to be able to validate parameters’ types and values. Types are easy enough, but I’m having a hard time creating a class to validate values. Specifically, the first class I want to build is one that requires the value to be in a user-defined interval.