discourse/discourse · error · Error

`between` rule expects min/max, eg: between:1,10

Error message

`between` rule expects min/max, eg: between:1,10

What it means

Error "`between` rule expects min/max, eg: between:1,10" thrown in discourse/discourse.

Source

Thrown at frontend/discourse/app/form-kit/lib/validation-parser.js:57

  requiredRule(args = "") {
    const [option] = args.split(",");
    return {
      trim: option === "trim",
    };
  }

  startsWithRule(prefix) {
    return { prefix };
  }

  endsWithRule(suffix) {
    return { suffix };
  }

  betweenRule(args) {
    if (!args) {
      throw new Error("`between` rule expects min/max, eg: between:1,10");
    }

    const [min, max] = args.split(",").map(Number);

    return {
      min,
      max,
    };
  }

  lengthRule(args) {
    if (!args) {
      throw new Error("`length` rule expects min/max, eg: length:1,10");
    }

    const [min, max] = args.split(",").map(Number);

    return {

View on GitHub (pinned to 1b2d7253e8)

When it happens

Trigger: Thrown at frontend/discourse/app/form-kit/lib/validation-parser.js:57 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of discourse/discourse@1b2d7253e8 (2026-08-26). Data as JSON: /api/errors/12ed111138dcdb75. Report an issue: GitHub.