External module "src/validators/length"
Functions
length
- length<Params>(requirements: number | object | object | object | object, options?: RuleOptions): Validator<Params>
-
Type parameters
Parameters
-
requirements: number | object | object | object | object
-
The validation object.
Validates that the specified value has the required size.
length(3) length({is: 3}) length({min: 3}) length({max: 3}) length({min: 3, max: 10}) len(3) size(3)
useForm(({ len }) => ({ password: [len({ min: 10 })] }));