Hi !

2006/1/27, Norman Timmler <[EMAIL PROTECTED]>:
> validates_presence_of :email_address, :message => 'Give me an address!'
> validates_format_of :email_address, :with => /[EMAIL PROTECTED],}/,
>                     :message => 'Something's wrong with your address!'

In this specific case, couldn't you replace the regexp and leave of
the validates_presence_of ?

validates_format_of :email_address, :with => /[EMAIL PROTECTED],}\Z/,
                    :message => 'Something's wrong with your address,
or it\'s missing!'

Notice I added anchor points to the regexp.  I do realize that this
doesn't solve all cases, though.

Bye !
--
François Beausoleil
http://blog.teksol.info/
_______________________________________________
Rails-core mailing list
Rails-core@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-core

Reply via email to