Not getting validation error message

i have one comment controller to put comment on article
i have used this form add in my website part or some other
controller
put two validation
validates_presence_of(:name,:comment)

code of other controller

@comment = Comment.new
@commentgiven=Comment.find(:all,:conditions =>
“content_master_id=#{@content.id}”)

           respond_to do |format|
            format.html {  render :file => "#{Rails.root}/app/

views/public/article.html.erb"}
format.xml { render :xml => @comment }
end

    the validation error message is not showing in other

controller
any body can help me on this …

thanks

rahul

Rahul M. wrote:

i have one comment controller to put comment on article
i have used this form add in my website part or some other
controller
put two validation
validates_presence_of(:name,:comment)

code of other controller

@comment = Comment.new
@commentgiven=Comment.find(:all,:conditions =>
“content_master_id=#{@content.id}”)

           respond_to do |format|
            format.html {  render :file => "#{Rails.root}/app/

views/public/article.html.erb"}
format.xml { render :xml => @comment }
end

    the validation error message is not showing in other

controller
any body can help me on this …

thanks

You are only doing new and find. Typically validations
are run with save or update.

Plus retrieving errors happens in erb so post that
if needed.

rahul