octobercms/october · error · Error

The min.value parameter is not defined in the Length…

Error message

The min.value parameter is not defined in the Length Inspector validator configuration.

What it means

The Length validator requires its min option to include a numeric 'value'; when min is present without one the validator cannot compute the lower bound and throws during doCommonChecks. This is a malformed validator configuration, not a bad user value.

Solutions

  1. Provide min as {value: <length>, message: '...'} in the Length validator options
  2. Validate the widget/field YAML where the length validator is declared
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at modules/backend/assets/foundation/controls/inspector/inspector.validator.length.js:38 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/8d9d01000db81660. Report an issue: GitHub.

Appendix: source

Thrown at modules/backend/assets/foundation/controls/inspector/inspector.validator.length.js:38

        if (typeof value == 'boolean') {
            this.throwError('The Length Inspector validator cannot work with Boolean values.')

        }

        var length = null

        if(Object.prototype.toString.call(value) === '[object Array]' || typeof value === 'string') {
            length = value.length
        }
        else if (typeof value === 'object') {
            length = this.getObjectLength(value)
        }

        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 Inspector validator configuration.')
                }

                if (length < this.options.min.value) {
                    return this.options.min.message !== undefined ?
                        this.options.min.message :
                        "The value 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 Inspector validator configuration.')

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

View on GitHub (pinned to b608633a7e)