isStringLength
isStringLength({ min, max })Arguments:
Possible errors:
If provided Verificable is not a string:
Verificable is not a string:{
type: "isString",
path: [/* ... */]
}If provided Verificable is a string with length being outside of the range:
Verificable is a string with length being outside of the range:{
type: "isStringLength",
path: [/* ... */],
min: /* provided min value */,
max: /* provided max value */,
}Examples:
Non-string values will fail with an isString error:
isString error:String values with length outside of requested range will fail with isStringLength error:
isStringLength error:String values with length inside of requested range will match:
Not providing min, max or both constrains will mean no requirement on those missing 'ends' of the range:
min, max or both constrains will mean no requirement on those missing 'ends' of the range:Last updated