i love how the validation works with AR on forms, but is there an easy way to customize that a little more? like the html that the errors are wrapped in? also, is there a way to break it up if you want to show each error alongside the problem field, or with the helpers do you always have to keep everything in the same place? --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
sorry for not looking this one up first. i didn''t think i would find it so easily. i found this example on the Rails docs: <%= error_message_on "post", "title" %> => <div class="formError">can''t be empty</div> <%= error_message_on "post", "title", "Title simply ", " (or it won''t work)", "inputError" %> => <div class="inputError">Title simply can''t be empty (or it won''t work)</div> --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
I usually just override the method error_messages_on. On 10/4/06, Josh <jjkiesch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > i love how the validation works with AR on forms, but is there an easy > way to customize that a little more? like the html that the errors are > wrapped in? > > also, is there a way to break it up if you want to show each error > alongside the problem field, or with the helpers do you always have to > keep everything in the same place? > > > > >--~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---