Function validateNullable

  • A validator function which checks whether an input value is null or any other type. If null, then the validator chain is stopped and null is returned, otherwise, the validator chain is not stopped and the value is returned.

    Parameters

    • value: unknown

    Returns [value: unknown | null, stop: boolean]