
Security News
CISA’s 2025 SBOM Guidance Adds Hashes, Licenses, Tool Metadata, and Context
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.
email_format_validator
Advanced tools
Add this line to your Gemfile:
gem 'email_format_validator'
Then run:
bundle install
Add the following to one of your models:
validates :email, email_format: true
You can turn on RFC 822 compliant email verification by passing on:
validates :email, email_format: { rfc: true }
Be aware that this is disabled by default as websites will often need a less permissive email check than the RFC one (check out tests for more details).
You can also modify the default message ("is improperly formatted") if validation fails:
validates :email, email_format: { message: "is not well formatted" }
If you use I18n, the default key to translate is :improperly_formatted. So if you add to your User model:
validates :email, email_format: true
You can translate (or overload) the default message via for e.g. (in english): "en.activerecord.errors.models.user.attributes.email.improperly_formatted"
cd test
ruby email_format_validator_test.rb
Ruby 1.8 is not supported.
Regular Expression tests based on Comparing E-mail Address Validating Regular Expressions
FAQs
Unknown package
We found that email_format_validator 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
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.
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.