revel/revel — pull request #537 by landr0id (2014-03-01 07:53:05+00:00)
Title: Added unit tests for validators

This commit adds testing for all of the validators, as mentioned in #533. All tests currently passed, but I noticed that for the email validator some of them *shouldn't*. For instance, I believe that the email `t0est+email123ñ@1abc0-def.com` should have passed the tests but because of the unicode `ñ`, it did not.

The [requirements for the local part](http://en.wikipedia.org/wiki/Email_address#Local_part) are somewhat complex, and I don't think that our supplied regex should check that at all. Instead, perhaps we should simplify the regex so it just checks to ensure it matches

@

.? The way we currently have it defined also makes writing automated tests like this hard.