validates_format_of :email, :with => /\A([...@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\Z/i, :on => :create end
On Wed, Mar 10, 2010 at 5:16 PM, Rajinder Yadav <devguy...@gmail.com> wrote: > How can I validate and email address without using complex reg-ex is there > a simple rails way to do this? > > > -- > Kind Regards, > Rajinder Yadav > > -- > 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 rubyonrails-t...@googlegroups.com. > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscr...@googlegroups.com<rubyonrails-talk%2bunsubscr...@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > > -- Thanks: Rajeev sharma -- 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 rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.