packages feed

spata-2009.9.18: readme.md

Spata
=====

bruteforce form validation

Demo
====

put following in `test.hs`

    import Network.Spata
    import MPS.Env
    import Prelude ()

    inputs = [("a", "1"), ("b", "2"), ("c", "")]

    main = print - guard inputs - do
      validate inclusion_of ["a", "b", "c"]
      validate presence_of ["c"]


`runghc test.hs` should output

    Left "c can not be empty"