Skip to content

Instantly share code, notes, and snippets.

@sritchie
Created October 18, 2011 23:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sritchie/1297027 to your computer and use it in GitHub Desktop.
Save sritchie/1297027 to your computer and use it in GitHub Desktop.
(def signup-validator
"Validates all signup form fields. Also makes sure that the user
doesn't already exist, and that the two passwords match."
(v/build-validator (v/non-empty-string :username :email
:password :password_repeat
label-map)
:ensure
unique-user?
:ensure
passwords-match?))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment