Skip to content
This repository has been archived by the owner on Oct 20, 2021. It is now read-only.

Latest commit

 

History

History
17 lines (12 loc) · 486 Bytes

call.md

File metadata and controls

17 lines (12 loc) · 486 Bytes

Call

This is a very low level validator. It calls a function, method or closure for the input and then validates it.

Valid values:

validator.call((): string[] => [], validator.arrayVal()).validate('foo');
validator.call((inpuy: any): any => input, validator.numberVal()).validate(10);

Invalid values:

validator.call((): string => 'foo', validator.arrayVal()).validate('foo');
validator.call((input: any): any => input, validator.numberVal()).validate('foo');