Handbook
Glossary
v-number ( str -- n )
Form validators
Prev:
v-required ( str -- str )
Next:
v-integer ( str -- n )
Vocabulary
validators
Inputs
str
a
string
Outputs
n
a
real
Word description
Converts the string into a real number, throwing a validation error if the string is not a valid real number.
Definition
USING:
kernel
math.parser
;
IN:
validators
:
v-number
( str -- n )
[
string>number
]
[
"must be a number"
throw
]
?unless
;