spata: brainless form validation

[ bsd3, library, web ] [ Propose Tags ] [ Report a vulnerability ]

tiny validation library


[Skip to Readme]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 2009.9.18, 2009.9.18.1, 2010.10.10
Change log changelog.md
Dependencies base (>=4 && <5), dlist, mps (>=2009.9.18), mtl [details]
License BSD-3-Clause
Author Jinjing Wang
Maintainer Jinjing Wang <nfjinjing@gmail.com>
Category Web
Home page http://github.com/nfjinjing/spata
Uploaded by JinjingWang at 2010-10-10T04:10:29Z
Distributions
Reverse Dependencies 1 direct, 0 indirect [details]
Downloads 2315 total (11 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs uploaded by user
Build status unknown [no reports yet]

Readme for spata-2010.10.10

[back to package description]

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"