-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Closed
Labels
Description
Checks
- I added a descriptive title to this issue
- I have searched (google, github) for similar issues and couldn't find anything
- I have read and followed the docs and couldn't find an answer
- After submitting this, I commit to one of:
- Look through open issues and helped at least one other person
- Hit the "watch" button on this repo to receive notifications and I commit to help at least 2 people that ask questions in the future
- Implement a Pull Request for a confirmed bug
Question
Is there a way to validate data input compared to type hinted function signature, without calling the function? I've seen https://pydantic-docs.helpmanual.io/usage/validation_decorator/ but that appears to do the validation check when calling the function.
Example use case/context:
User input (e.g. from a configuration file) is used to call different functions and/or initiate different classes. It would be nice to quickly provide the user with a collection of validation feedback in one go, and not having to wait on e.g. the first X function calls to be successful while X+1 turns out to have invalid data input.