Handbook
Glossary
v-min-value ( x n -- x )
Form validators
Prev:
v-max-length ( str n -- str )
Next:
v-max-value ( x n -- x )
Vocabulary
validators
Inputs
x
an
integer
n
an
integer
Outputs
x
an
integer
Word description
Throws an error if
x
is smaller than
n
.
Definition
USING:
kernel
make
math
math.parser
;
IN:
validators
:
v-min-value
( x n -- x )
2dup
<
[
[
"must be at least "
%
#
]
""
make
throw
]
[
drop
]
if
;