Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "src/validators/length"

Index

Variables

Functions

Variables

Const len

len: length = length

Const size

size: length = length

Functions

length

  • length<Params>(requirements: number | object | object | object | object, options?: RuleOptions): Validator<Params>
  • Validates that the specified value has the required size.

    example
    length(3)
    length({is: 3})
    length({min: 3})
    length({max: 3})
    length({min: 3, max: 10})
    len(3)
    size(3)
    example
    useForm(({ len }) => ({
      password: [len({ min: 10 })]
    }));

    Type parameters

    • Params

    Parameters

    • requirements: number | object | object | object | object

      The expected requirements.

    • Optional options: RuleOptions

      The validator options.

    Returns Validator<Params>

    The validation object.

Generated using TypeDoc