field

source

field<T>(validator: Validator): PropertyDecoratorsource

Defines the validation function for a class property.

field<T>(key: string | symbol, validator: Validator): ParameterDecoratorsource

Defines the validation function for a class property defined in a constructor parameter.