I have something like this in one of my apps for email and cell: validate :presence_of_email_or_cell
def presence_of_email_or_cell errors.add("Either an email address or cell phone number is required") if email.blank? and cell_number.blank? end On Sep 29, 9:34 am, "John T." <rails-mailing-l...@andreas-s.net> wrote: > Thriving K. wrote: > > Mukund wrote: > >> Write your own validate routine instead of using the helpers. > > >> On Sep 29, 11:32 am, "Thriving K." <rails-mailing-l...@andreas-s.net> > > > Is there any guideline for that... please. > > www.google.com > -- > Posted viahttp://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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-talk@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 -~----------~----~----~----~------~----~------~--~---