Viewing validation errors

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?

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” %> =>

can’t be empty

<%= error_message_on “post”, “title”, "Title simply “, " (or it won’t
work)”, “inputError” %> =>

Title simply can’t be empty (or it won’t

I usually just override the method error_messages_on.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs