validate_presence_of problem

Hi In my application i want to validate the fields of perticular views. in my application: controller name: streams_controller model name: stream and i want to validates a text field in the view "new.html.erb".here tis field take a file to be uploaded

i have a text field called :location in new.html.erb view to validate this field i have wriiten code in model like:

class Stream < ActiveRecord::Base validates_presence_of :location ..... ... ... end

i did not see any validation. Can any one help where i am doing hte mistake.

thanks Srikanth

Hi, please take a look at look at the following:

validates_presence_of

Good luck,

-Conrad