validate-params ( validators -- )
Furnace framework » Furnace actions » Form validation with actions

Next:validation-failed ( -- * )


Vocabulary
furnace.actions

Inputs
validatorsan association list mapping parameter names to validator quotations


Outputs
None

Word description
Validates query or POST parameters, depending on the request type, and stores them in HTML form values. The validator quotations can execute Form validators.

Examples
A simple validator from webapps.todo; this word is invoked from the validate quotation of action for editing a todo list item:
: validate-todo ( -- ) { { "summary" [ v-one-line ] } { "priority" [ v-integer 0 v-min-value 10 v-max-value ] } { "description" [ v-required ] } } validate-params ;


See also
validate-values

Definition