@metreeca/core - v0.9.22
    Preparing search index...

    Function length

    • Constrains string length.

      Bounds are inclusive; an undefined bound leaves the corresponding end unconstrained.

      Parameters

      • min: number | undefined

        The minimum accepted length, or undefined for no lower bound

      • max: number | undefined

        The maximum accepted length, or undefined for no upper bound

      Returns Validator<string>

      A validator reporting a violation if the value length falls outside the bounds