API Reference
func_validator.validate_params(func=None, /, *, check_arg_types=False)
Decorator to validate function arguments at runtime based on their
type annotations using typing.Annotated and custom validators. This
ensures that each argument passes any attached validators and
optionally checks type correctness if check_arg_types is True.
| PARAMETER | DESCRIPTION |
|---|---|
func
|
The function to be decorated. If None, the decorator is returned for later application. Default is None.
TYPE:
|
check_arg_types
|
If True, checks that all argument types match. Default is False.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
DecoratorOrWrapper
|
The decorated function with argument validation, or the decorator itself if |
| RAISES | DESCRIPTION |
|---|---|
TypeError
|
If |