
Security News
Vite Releases Technical Preview of Rolldown-Vite, a Rust-Based Bundler
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.
= email_validator ActiveModel::EachValidator
Validate e-mail addresses against RFC 2822 and RFC 3696.
== Installation
gem 'vjt-email_validator', :git => 'git://github.com/vjt/email_validator'
== Usage
Standalone:
EmailValidator.valid?(email) # => true or false
Inside an ActiveRecord model:
class Person < ActiveRecord::Base validates :email, :email => true end
=== Options
Giving :email => true
to the validate
method uses the following default options.
Customize them using :email => { .. }
; E.g. :email => {:check_mx => true}
:message String. A custom error message (default is: "does not appear to be a valid e-mail address") :mx_message String. A custom error message displayed when there is no MX for the given e-mail address (default is: "is not routable") :multiple_message String. A custom error message displayed when one of the e-mail addresses in the record is invalid (default is "appears to contain an invalid e-mail address) :multiple Boolean. Allows multiple email addresses separated by space and/or comma/colon :check_mx Boolean. Check domain for a valid MX record (default is false) :local_length Maximum number of characters allowed in the local part (default is 64) :domain_length Maximum number of characters allowed in the domain part (default is 255)
== Testing
To execute the unit tests run rake test.
The unit tests for this plugin use an in-memory sqlite3 database.
== Resources
== Original Credits
Written by Alex Dunae (dunae.ca), 2006-11.
Many thanks to the plugin's recent contributors: https://github.com/alexdunae/validates_email_format_of/contributors
Thanks to Francis Hwang (http://fhwang.net/) at Diversion Media for creating the 1.1 update. Thanks to Travis Sinnott for creating the 1.3 update. Thanks to Denis Ahearn at Riverock Technologies (http://www.riverocktech.com/) for creating the 1.4 update. Thanks to George Anderson (http://github.com/george) and 'history' (http://github.com/history) for creating the 1.4.1 update.
== Rewrite
Rewrote by Marcello Barnaba (vjt@openssl.it), 2011-02 as an ActiveModel::EachValidator
FAQs
Unknown package
We found that vjt-email_validator demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
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.
Security News
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.
Research
Security News
A malicious npm typosquat uses remote commands to silently delete entire project directories after a single mistyped install.
Research
Security News
Malicious PyPI package semantic-types steals Solana private keys via transitive dependency installs using monkey patching and blockchain exfiltration.