Skip to content
Browse files

pointing out example for comp

  • Loading branch information...
1 parent fa1d845 commit 4ed6c434779057118ba789dce810902712d4db0c @logaan committed Oct 14, 2013
Showing with 5 additions and 1 deletion.
  1. +5 −1
@@ -25,7 +25,6 @@ API Docs: <>
(fact (validate (present [:age]) {:name "Logan"})
=> [{:type :vlad.validations/present
:selector [:age]}])
## Composition
@@ -58,6 +57,11 @@ redundant error messages.
{:selector [:password], :type :vlad.validations/present}))
+Notice that only the `:vlad.validations/present` validation was shown for
+`:password`. Errors about length, patterns and confirmation are not shown until
+appropriate. In this case `chain` has also saved us from nil pointer errors as
+later validations are only run if earlier ones pass.
And of course all these validations could be run over any data. Whether you're
pulling it in from a web service, a database or a csv file somewhere.

0 comments on commit 4ed6c43

Please sign in to comment.
Something went wrong with that request. Please try again.