Interface Validator<Options, Plugin>

The validator to which the field value validation is delegated.

interface Validator<Options, Plugin> {
    validate?(field: Field<any, Plugin>, options: undefined | Options): void;
    validateAsync?(field: Field<any, Plugin>, options: undefined | Options): Promise<void>;
}

Type Parameters

  • Options = any

    Options passed to the validator.

  • Plugin = any

    The plugin injected into the field.

Methods