On Wed, Jan 25, 2012 at 04:34, naga surya <[email protected]> wrote:

> i am not reflecting the error message at the
> field, what should i have to do to diplay the error as "start time
> should be before end time".

Probably your view is not checking for errors on the object.  You need
code in it something like:

  <% if @widget.errors.any? %>
    <div id="error_explanation">
      <h2><%= pluralize(@widget.errors.count, "error") %> prohibited
this widget from being saved:</h2>
      <ul>
      <% @widget.errors.full_messages.each do |msg| %>
        <li class="error"><%= msg %></li>
      <% end %>
      </ul>
    </div>
  <% end %>

Check your view (or layout) for such code, and if not there, stick
this in, substituting your model name for widget.

-Dave

-- 
Dave Aronson:  Available Cleared Ruby on Rails Freelancer
(NoVa/DC/Remote) -- see www.DaveAronson.com, and blogs at
www.Codosaur.us, www.Dare2XL.com, www.RecruitingRants.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