is-email? should be case insensitive #100

Merged
merged 1 commit into from May 11, 2012

Conversation

Projects
None yet
2 participants
Contributor

scstarkey commented May 11, 2012

Greetings,

I was a bit surprised to see that noir.validation/is-email? wasn't case sensitive, and figured I'd toss in a modification to allow for it. This keeps users from having to do:

(vali/rule (vali/is-email? (str/lower-case email)) ;wtf?!
    [:email "Please specify a valid email address."])

and instead:

(vali/rule (vali/is-email? email) ;yay!
    [:email "Please specify a valid email address."])

Hope you like!

Stephen.

Owner

Raynes commented May 11, 2012

Excellent. Thanks!

Raynes added a commit that referenced this pull request May 11, 2012

Merge pull request #100 from scstarkey/master
is-email? should be case insensitive

@Raynes Raynes merged commit 65c950d into noir-clojure:master May 11, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment