zhanymkanov / fastapi-best-practices

FastAPI Best Practices and Conventions we used at our startup
9.38k stars 700 forks source link

Update constr regex parameter name #43

Closed taro0513 closed 5 months ago

taro0513 commented 6 months ago

Modified constr parameter name from regex to pattern

zhanymkanov commented 5 months ago

Hey, thank you for your PR.

Pattern is indeed a correct way to set regex in Pydantic v2, but it's also not recommended to use constr at all in the new version.

This issue is fixed in the new version of this article.