Vocabulary
validators

Inputs
stra string
nan integer


Outputs
stra string


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

Definition


: v-max-length ( str n -- str )
over length over > [
[ "must be no more than " % # " characters" % ] "" make
throw
] [ drop ] if ;