Hex Core JS
    Preparing search index...

    Function maxDateValidator

    • Returns a validation function to validate that a date is less than or equal to the max date, if given.

      Parameters

      • OptionalmaxDate: string | null

        The maximum allowed date value.

      • OptionalerrorMessage: string

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

      • precision: DateTimePrecision = "day"

        The level of precision used to validate.

      Returns (value: string | null) => ValidationResult.Success | ValidationResult.Failure