isStringLength
Verifies if provided Verificable
represents a string with length
within specified range. Both min
and max
arguments are optional - not providing any of them means value on that 'end' will not be checked.
Arguments:
min
- optional, of typenumber
max
- optional, of typenumber
Possible errors:
If provided Verificable
is not a string:
Verificable
is not a string:If provided Verificable
is a string with length being outside of the range:
Verificable
is a string with length being outside of the range:Examples:
Each of examples uses this import statement:
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
Was this helpful?