Hex Core JS
    Preparing search index...

    Function maxValueValidator

    • Returns a validation function to validate that a number is less than or equal to the max value, if given. Inclusive version of upperBoundValidator.

      Note: null values count as valid.

      Parameters

      • OptionalmaxValue: number

        The maximum allowed value.

      • OptionalerrorMessage: string

        A custom error message to display if the value is invalid.

      Returns SyncValidationFunction<number | null>