I found another problem when i use this code

validates_presence_of :mobile_number,:if => :phone_number_blank_check
validates_presence_of :phone_number,:if => :mobile_number_blank_check

def phone_number_blank_check
        self.phone_number.blank?
end

def mobile_number_blank_check
        self.mobile_number.blank?
end

when both field leave blank, it happened two message told that
mobile_number can't be blank and phone_number can't be blank

i want it to appear only one message tell that
phone number or mobile number can't be blank, how could i do that.
-- 
Posted via http://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 [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to