I'm using zope.formlib (aka zc.page) for rendering (complex) forms. I think this works out great!

Still there's something I cannot really bend my head arround and that's dealing with invariant errors. Hopefully my explanation/question is not too fuzzy because of that...

I think to understand that, upon form submission, the form update() method takes care of first setting up the (edit or input) widgets, then determining what action should be called, and just before that validating the user input.

The validation of user input might result in errors validation and/or invariant errors. This list of (both validation and invariant) errors is then set on the form and can be used to display feedback to the user.

I'm actually not using this list of errors on the form for rendering end-user feedback, but the error() method on the indivual rendered widget, in order to display the feedback message next to the rendered widget.

Wouldn't it make sense to set the validation errors on the errors attribute, and set the invariant errors on a seperate invariant_errors attribute on the form? Or maybe there's some other way to get hold of the invariant errors and display them seperately?

Of course, if I need to explain in more detail what I try to achieve, please let me know..!

kind regards,

Jan-Wijbrand Kolman
Zope3-dev mailing list
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com

Reply via email to