This code is used to validate mail format: This is normal regular
expression format
=begin
validates_format_of :email,
:if => Proc.new { |employee| employee.email.nil?
employee.email.empty?},
:with => /^[A-Z0-9._%-]+@([A-Z0-9-]+\.)+[A-Z]
{2,4}$/i,
:message => "must be a valid email address"
=end
contact email: [email protected]
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.