]> gitweb.factorcode.org Git - factor.git/commitdiff
html.forms: Rename
authorDoug Coleman <doug.coleman@gmail.com>
Sun, 24 Mar 2013 17:09:16 +0000 (10:09 -0700)
committerDoug Coleman <doug.coleman@gmail.com>
Sun, 24 Mar 2013 17:11:18 +0000 (10:11 -0700)
basis/html/forms/forms-tests.factor
basis/html/forms/forms.factor

index b1596e9aa677c4dccdfdd4e595ac4d34a060a7b5..d311e57bab1bdafceba37d7219fadd066657c993 100644 (file)
@@ -18,7 +18,7 @@ IN: html.forms.tests
 [ t ] [
     [
         "140" [ v-number 13 v-min-value 100 v-max-value ] validate
-        [ validation-error? ]
+        [ validation-error-state? ]
         [ value>> "140" = ]
         bi and
     ] with-validation
@@ -38,7 +38,7 @@ person {
         validate-values
         validation-failed?
         "age" value
-        [ validation-error? ]
+        [ validation-error-state? ]
         [ message>> "required" = ]
         bi and
     ] with-validation
index cf959ba058d3a614d779e89965e669bb42113831..c6e32d5b159b3c424be7d98990417e40cb374d0c 100644 (file)
@@ -80,9 +80,9 @@ SYMBOL: nested-forms
         ] with-scope
     ] dip set-value ; inline
 
-TUPLE: validation-error value message ;
+TUPLE: validation-error-state value message ;
 
-C: <validation-error> validation-error
+C: <validation-error-state> validation-error-state
 
 : validation-error ( message -- )
     form get
@@ -96,11 +96,11 @@ C: <validation-error> validation-error
     >hashtable "validators" set-word-prop ;
 
 : validate ( value quot -- result )
-    '[ _ call( value -- validated ) ] [ <validation-error> ] recover ;
+    '[ _ call( value -- validated ) ] [ <validation-error-state> ] recover ;
 
 : validate-value ( name value quot -- )
     validate
-    dup validation-error? [ form get t >>validation-failed drop ] when
+    dup validation-error-state? [ form get t >>validation-failed drop ] when
     swap set-value ;
 
 : validate-values ( assoc validators -- )