2 USING: kernel sequences tools.test assocs html.forms validators accessors
5 : with-validation ( quot -- messages )
13 "14" [ v-number 13 v-min-value 100 v-max-value ] validate
19 "140" [ v-number 13 v-min-value 100 v-max-value ] validate
26 TUPLE: person name age ;
30 { "age" [ v-number 13 v-min-value 100 v-max-value ] }
36 { { "age" [ v-required ] } }
41 [ message>> "required" = ]
46 [ H{ { "a" 123 } } f ] [
63 "foo" validation-error
65 form get errors>> first