Sep 2nd, 2010, 06:04 AM
I was wondering if somebody could help me on a issue I am facing.
Is there a easy way to iterate through the errors returned by a controller? I mean, without bind tag and outside of a form tag. I am looking for a very generic way of showing the validation errors.
Sep 2nd, 2010, 07:33 AM
I think you can use
to display all the errors.
Sep 2nd, 2010, 07:42 AM
thanks for your reply.
This works within form:form tag fine.
Unfortunately outside of form:form it displays nothing.
Sep 2nd, 2010, 07:45 AM
So the page where you want to display validation errors doesn't have a form tag? Wouldn't you need one anyway to submit form data?
Sep 2nd, 2010, 08:13 AM
I do have a form, but i am trying to accomplish this template with sitemesh
[ header ]
[menu | body ]
[ footer ]
so all the error messages are going to be handled by the template and i won't need to care anymore on displaying them.
Sep 2nd, 2010, 08:25 AM
Hmm..then you probably have to hack around the form errors tag..maybe extend it and customize it to work for your situation.