Kevin Dangoor wrote:
- It really gave me the idea of putting an attribute 'error_message' into each Widget so that form validation could be more verbose when showing the form back to the user, so that he knows what is wrong... For FormTable, I believe the message could go on the same column the widget itself is shown, after a "<br />", putting it on the line below the field the user filled -- and in red? ;-)Yeah, the style sheet stuff needs to happen for the widgets to provide some easy customizability. And the template needs to be made better. I believe that FormEncode provides ways to customize the error message for a validator, and we can certainly spruce that up if we need to.
You pass in messages={'messageName': 'Message text'} to the constructor (or class statement). Each validator now enumerates all of its messages (including inherited messages) in the documentation: http://formencode.org/module-formencode.validators.html
What I'd like at some point (and might do soon because I actively need it at work) is a way to dump all the messages to an editable (non-code) file and also read them from a file. This would allow non-programmers to more easily edit these messages. However, I do not know what the file would look like. It would have some structure, because it is common to override a message for just a specific validator. XML is barely more editable (at least for my audience) than Python code. Maybe less, all considered.
Internalization provides overrides, but they are flat translations, so they don't have the same capabilities.
Now, a web application for editing these messages, that would be cool... -- Ian Bicking / [EMAIL PROTECTED] / http://blog.ianbicking.org

