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

Prev:v-min-length ( str n -- str )
Next:v-min-value ( x n -- x )


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 ;