v-min-length ( str n -- str )
Form validators

Prev:v-optional ( str quot -- result )
Next:v-max-length ( str n -- str )


Vocabulary
validators

Inputs and outputs
stra string
nan integer


Word description
Throws a validation error if the string is shorter than n characters.

Definition


: v-min-length ( str n -- str )
over length over < [
[ "must be at least " % # " characters" % ] "" make
throw
] [ drop ] if ;