
Security News
New Website “Is It Really FOSS?” Tracks Transparency in Open Source Distribution Models
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
dancroak-validates_email_format_of
Advanced tools
Validate various formats of email address against RFC 2822.
class PersonTest < ActiveSupport::TestCase
should_validate_email_format_of :email
end
class Person < ActiveRecord::Base
validates_email_format_of :email
end
:message =>
String. A custom error message (default is: " does not appear to be a valid e-mail address")
:on =>
Symbol. Specifies when this validation is active (default is :save, other options :create, :update)
:allow_nil =>
Boolean. Allow nil values (default is false)
:allow_blank =>
Boolean. Allow blank values (default is false)
:if =>
Specifies a method, proc or string to call to determine if the validation should occur
(e.g. :if => :allow_validation, or :if => Proc.new { |user| user.signup_step > 2 }). The method,
proc or string should return or evaluate to a true or false value.
:unless =>
See :if option.
To execute the unit tests run rake test.
The unit tests for this plugin use an in-memory sqlite3 database.
Written by Alex Dunae (dunae.ca), 2006-07.
Thanks to Francis Hwang (http://fhwang.net/) at Diversion Media for creating the 1.1 update.
FAQs
Unknown package
We found that dancroak-validates_email_format_of demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 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
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
Security News
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
Security News
The Latio podcast explores how static and runtime reachability help teams prioritize exploitable vulnerabilities and streamline AppSec workflows.