On Wed, Oct 10, 2012 at 8:59 AM, jude <[email protected]> wrote:
> class Person < ActiveRecord::Base validates_format_of :email, :with =>
> %r\A([^@\s]+)@((?:[-a-z0-9]+.)+[a-z]{2,})\Z/, :on => :create end
> validates :email, :format => { :with =>
> %r\A([^@\s]+)@((?:[-a-z0-9]+.)+[a-z]{2,})\Z/, :on => :create }
%r\A([^@\s]+)@((?:[-a-z0-9]+.)+[a-z]{2,})\Z/
%r\A\Z/
%r/
Maybe use %r!! instead of %r/?
--
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 https://groups.google.com/groups/opt_out.