
Security News
Follow-up and Clarification on Recent Malicious Ruby Gems Campaign
A clarification on our recent research investigating 60 malicious Ruby gems.
validates_email_address_of
Advanced tools
This provides an email validator for ActiveRecord 3.
Add this line to your application's Gemfile:
gem 'validates_email_address_of'
And then execute:
$ bundle
Or install it yourself as:
$ gem install validates_email_address_of
Here is the quick and dirty way to include validates_email_address_of
class User < ActiveRecord::Base
attr_accessible :email, :password, :password_confirmation
has_secure_password
validates :email, :email_address => true
end
There are three separate validation tests that get more and more complete. Each test is independent of the others. While all test are indepent if a lower level test fails it will skip the high level test. All test run by default.
This is a basic RegEx validation and only checks that the email is in the correct format. You can enable or disable
by specifying the :format
option.
validates :email, :email_address => { :format => false }
This test gets even more acurate than just checking the format. This checks that the domain has at least one
MX record attached to it. this can be disabled similarly to format, except with the :mx
option.
validates :email, :email_address => { :mx => false }
This is the ultimate test. This will actually contact the mail server and ask it to verify that the provided email
exists. While this guarentees the email will exist it is slow, due to the slow run we suggest only running this test
on create. This can be controlled with the :smtp
option.
validates :email, :email_address => { :smtp => flase }
git checkout -b my-new-feature
)git commit -am 'Added some feature'
)git push origin my-new-feature
)FAQs
Unknown package
We found that validates_email_address_of demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
A clarification on our recent research investigating 60 malicious Ruby gems.
Security News
ESLint now supports parallel linting with a new --concurrency flag, delivering major speed gains and closing a 10-year-old feature request.
Research
/Security News
A malicious Go module posing as an SSH brute forcer exfiltrates stolen credentials to a Telegram bot controlled by a Russian-speaking threat actor.