I am trying to put a constraint on a secret string. If I could, for instance, I would like something like this:
from pydantic import constr, SecretStr
class SimpleModel(BaseModel):
password: (SecretStr, constr(min_length=8, max_length=32))
And if it is possible to do something that accomplishes this, my next question will be: Can I also add a constraint that a non-word character is needed? I can do regex checks on my own, but I am trying to adopt pydantic more fully.