Handbook
Glossary
v-required ( str -- str )
Form validators
Prev:
v-regexp ( str what regexp -- str )
Next:
v-number ( str -- n )
Vocabulary
validators
Inputs
str
a
string
Outputs
str
a
string
Word description
Throws a validation error if the string is empty.
Definition
USING:
kernel
sequences
;
IN:
validators
:
v-required
( str -- str )
dup
empty?
[
"required"
throw
]
when
;