Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

xHire-validates_as_email

Package Overview
Dependencies
Maintainers
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

xHire-validates_as_email

  • 0.6.0
  • Rubygems
  • Socket score

Version published
Maintainers
4
Created
Source

ValidatesAsEmail

This gem/plugin is a re-packaged and gem'ified version of the original plugin with credit as follows:

Michal Zima xhire@mujmalysvet.cz Ximon Eighteen ximon.eighteen@int.greenpeace.org Dan Kubb dan.kubb@autopilotmarketing.com Thijs van der Vossen thijs@fngtps.com

This Ruby on Rails plugin implements an ActiveRecord validation helper called validates_as_email. The helper acts as if validates_format_of was used with a regular expression that defines an RFC822 email address conformance test.

The plugin implements the regular expression here:

http://tfletcher.com/lib/rfc822.rb

Which is an implementation in Ruby of a regular expression published by Cal Henderson for PHP here:

http://www.iamcal.com/publish/articles/php/parsing_email

Installation:

gem sources -a http://gems.github.com

Install the gem(s): sudo gem install xHire-validates_as_email

Add to environment.rb initializer block: config.gem 'xHire-validates_as_email', :lib => 'validates_as_email', :source => 'http://gems.github.com'

Usage:

In your model file do something like:

class MyClass < ActiveRecord::Base validates_as_emaile :email, :message => 'Invalid Email Address', :allow_nil => true end

Tests:

Some tests have been added.

License:

See the LICENSE file.

FAQs

Package last updated on 10 Aug 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc