Skip to main content

validate_arguments

Decorator to validate the arguments passed to a function.

def validate_arguments(
func: Optional['AnyCallableT'] = None,
config: 'ConfigType' = None
) - > Any

Decorator to validate the arguments passed to a function.

Parameters

NameTypeDescription
funcOptional['AnyCallableT'] = NoneThe callable function to be decorated for argument validation
config'ConfigType' = NoneA Pydantic configuration dictionary or class used to customize validation behavior

Returns

TypeDescription
AnyA wrapped version of the function that performs validation on call, or a decorator function if used without arguments.