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: www.bdeveloper01@yahoo.com
Is there a question there?
If it is not working it is probably because it is commented out.
Colin
What's the question? And where have you gotten this regex from...
firstly I'm confused why you're only allowing capital letters,
full-stops and underscores.... it's certainly possible to have a valid
email address with different characters than that.