Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
validates_email_whitelist_of
Advanced tools
Plugin for ActiveRecord for validating email format and whitelisting the domain.
Works on Rails 2+, Rails 3+ and Ruby 1.8+.
Add the gem to your Rails Gemfile
gem 'validates_email_whitelist_of'
Then on ActiveRecord 2.0+ you can do
class User < ActiveRecord::Base
validates_email_whitelist_of :email, :whitelist => ['example.com', 'google.com']
validates_email_blacklist_of :email, :blacklist => ['123.com']
end
On ActiveRecord 3.0+ you can do
class User < ActiveRecord::Base
validates :email, :whitelist => ['example.com', 'google.com']
validates :email, :blacklist => ['123.com']
end
If you want to use I18n, make sure you add the scope
activerecord.errors.messages.invalid_email
activerecord.errors.messages.invalid_whitelist
activerecord.errors.messages.invalid_blacklist
or
errors.messages.invalid_email
errors.messages.invalid_whitelist
errors.messages.invalid_blacklist
The following locales are builtin:
Copyright (c) 2011 Ruben Fonseca, released under the MIT license
FAQs
Unknown package
We found that validates_email_whitelist_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.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.