DEV Community

Discussion on: FastAPI - The Good, the bad and the ugly.

Collapse
 
fuadrafid profile image
Muhtasim Fuad Rafid • Edited

Thank you for reading!
You are suggesting custom validators, I was talking about the default validators provided by pydantic. These work fine, but image having a project with 50+ dataclasses, writing validators for each of the variables isn't really efficient.
You can see Springboot's validators. A simple message inside the annotation itself, simple and efficient.