Type Alias ValidationEntry

ValidationEntry: {
    error?: boolean;
    expected?: any[] | Function | Set<any>;
    message?: string;
    required?: boolean;
    test: "array" | "entry" | "entry|array";
    type?: string;
}

Provides data for a validation check.

Type declaration

  • Optionalerror?: boolean

    When true and an error is thrown otherwise a boolean is returned; default: true

  • Optionalexpected?: any[] | Function | Set<any>

    Optional array, function, or set of expected values to test against.

  • Optionalmessage?: string

    Optional message to include.

  • Optionalrequired?: boolean

    When false if the accessor is missing validation is skipped; default: true

  • test: "array" | "entry" | "entry|array"

    The type of entry / variable to test.

  • Optionaltype?: string

    Optionally tests with a typeof check.