ok...in this case you can do validation in this way.. validate :std_code
def std_code errors.add( :std_code ) if self.std_code and self.std_code.blank? end -Sandip R~ On Thu, Jun 4, 2009 at 8:46 PM, Colin Law <[email protected]> wrote: > > 2009/6/4 Newb Newb <[email protected]>: > > > > Thank you for taking time to reply... > > > > That is i have phone field into my table. > > I get country code and std code and phone code from the form > > after getting i append like below > > > > 1-011-5558 > > > > then i save into my phone field. > > > > so i in my modal i have like below > > > > attr_accessor :country_code,:std_code,phone_code > > > > > > for this purpose i have to validate those three atrr_accessor fields.. > > > > i mean is phone = country_code+"-"+std_code+"-"+phone_code > > Any Helps > > -- > > Have you tried my suggestion to use ruby-debug to break into the controller > just > before the validation and check the value of std_code? > > Colin > > > > -- Ruby on Rails Developer http://sandip.sosblog.com http://funonrails.wordpress.com www.joshsoftware.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 -~----------~----~----~----~------~----~------~--~---

