Handbook
Glossary
v-min-length ( str n -- str )
Form validators
Prev:
v-optional ( str quot -- result )
Next:
v-max-length ( str n -- str )
Vocabulary
validators
Inputs
str
a
string
n
an
integer
Outputs
str
a
string
Word description
Throws a validation error if the string is shorter than
n
characters.
Definition
USING:
kernel
make
math
math.parser
sequences
;
IN:
validators
:
v-min-length
( str n -- str )
over
length
over
<
[
[
"must be at least "
%
#
" characters"
%
]
""
make
throw
]
[
drop
]
if
;