Decorators Decorators can be used to validate functions. Decorator Index Example The following example ensures all function args are a positive int or a positive float.