Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
dead-simple validations for clojure
Clojure
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
src/corroborate
target/stale
test/corroborate
.gitignore
.travis.yml
README.md
project.clj

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.

Something went wrong with that request. Please try again.