Plugins - Validates as email
Add to favoritesThis Ruby on Rails plugin implements an ActiveRecord validation helper called validatesas_email. The helper acts as if validatesformat_of was used with a regular expression that defines an RFC822 email address conformance test.

The plugin marks a@yahoo as a valid address. RFC822 defines domain as:
domain = sub-domain *("." sub-domain)
i.e. there only has to be one part after the @ sign.
If you want to ignore the RFC and reject addresses such as a@yahoo, change * to + in the line
domain = "#{subdomain}(?:\x2e#{subdomain})*"
to
domain = "#{subdomain}(?:\x2e#{subdomain})+"
This plugin doesn't seem to do the best job of validating email addresses. It let 'jacksie@yahoo' pass as valid, which it clearly is not (no top level domain).
The problem isn't with the site but with open-uri which script/plugin is using. It is throwing a "OpenSSL::SSL::SSLError Exception: certificate verify failed" but the cert validates fine in both Opera and Firefox.
While waiting for a bug fix, just svn/tortoisesvn to checkout and then do an export.
svn co https://svn.greenpeace.org/repositories/railsplugins/validatesas_email/trunk/
This plugin looks promising but having to copy the files manually from the repository was a pain.......
This plugin looks promising but having to copy the files manually from the repository was a pain.......
Following the directions in the README, the plugin did not install. Not sure why.
I get: Plugin not found: ["https://svn.greenpeace.org/repositories/railsplugins/validatesas_email/"]
That being said, I manually created a validates_as_email folder under plugins and copied init.rb and the lib folder there and things seem to work.
Following the directions in the README, the plugin did not install. Not sure why.
I get: Plugin not found: ["https://svn.greenpeace.org/repositories/railsplugins/validatesas_email/"]
That being said, I manually created a validates_as_email folder under plugins and copied init.rb and the lib folder there and things seem to work.
Following the directions in the README, the plugin did not install. Not sure why.
I get: Plugin not found: ["https://svn.greenpeace.org/repositories/railsplugins/validatesas_email/"]
That being said, I manually created a validates_as_email folder under plugins and copied init.rb and the lib folder there and things seem to work.
I have to say that putting this behind https and not pointing it to trunk (or a tag) just makes this more difficult than it needs to be. Perhaps, just some instructions and warning would have saved me half an hour. I'm working in RadRails and it doesn't like https. Cheers