Function isValidStrList

Returns true if the input is a string array or comma-separated string, whose elements are valid according to the validator function.

  • Type Parameters

    • T extends string = string

    Parameters

    • value: unknown
    • checkFn: (value: string) => value is T
    • allowEmpty: boolean = true

      If false, then input without any entries is considered invalid.

    Returns value is CommaSeparatedStr<T> | T[]