• Validates the state of a number.

    The returned validator throws an error immediately if a validation fails.

    Type Parameters

    • T extends undefined | null | number

      the type the value

    Parameters

    • value: T

      the value

    • name: string

      the name of the value

    Returns NumberValidator<T>

    a validator for the value

    TypeError if name is undefined or null

    RangeError if name is empty