octobercms/october · error · Error

The max.value parameter is not defined in the Length table…

Error message

The max.value parameter is not defined in the Length table validator configuration

What it means

Configuration guard inside Length.validateValue: a max block exists in the options but has no value key, so the maximum string length check cannot be performed. The validation config declared max without max.value.

Solutions

  1. Add value to the max entry (e.g. max: { value: 255, message: '...' })
  2. Provide max.message for a custom message
  3. Review the column validation YAML
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at modules/backend/widgets/table/assets/js/table.validator.length.js:54 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of octobercms/october@b608633a7e (2026-08-21). Data as JSON: /api/errors/1833ca564a39af4e. Report an issue: GitHub.

Appendix: source

Thrown at modules/backend/widgets/table/assets/js/table.validator.length.js:54

        if (value.length == 0)
            return

        if (this.options.min !== undefined || this.options.max !== undefined) {
            if (this.options.min !== undefined) {
                if (this.options.min.value === undefined)
                    throw new Error('The min.value parameter is not defined in the Length table validator configuration')

                if (value.length < this.options.min.value) {
                    return this.options.min.message !== undefined ?
                        this.options.min.message :
                        "The string should not be shorter than " + this.options.min.value
                }
            }

            if (this.options.max !== undefined) {
                if (this.options.max.value === undefined)
                    throw new Error('The max.value parameter is not defined in the Length table validator configuration')

                if (value.length > this.options.max.value) {
                    return this.options.max.message !== undefined ?
                        this.options.max.message :
                        "The string should not be longer than " + this.options.max.value
                }
            }
        }

        return
    }

    $.oc.table.validator.length = Length
}(window.jQuery);

View on GitHub (pinned to b608633a7e)