dead-simple validations for clojure
Clojure
Latest commit 66c979f Sep 10, 2013 @pitluga bump version to 0.4.0

README.md

corroborate

A dead-simple validations library for Clojure.

Installation:

Leiningen:

[corroborate "0.2.0"]

Maven:

<dependency>
  <groupId>corroborate</groupId>
  <artifactId>corroborate</artifactId>
  <version>0.2.0</version>
</dependency>

Usage

(ns people
  (:use [corroborate.core]))

(defvalidator validate-person
  :first-name (is-required)
  :last-name (is-required)
  :phone (is-formatted #"\(\d{3}\) \d{3}-\d{4}")))

(validate-person {:first-name "Tony" :last-name "" :phone "867-5309"})
; {:last-name ["is required"] :phone ["is improperly formatted"]}

License

Copyright (C) 2011 Tony Pitluga

Distributed under the Eclipse Public License, the same as Clojure.