2008/3/22, Wichert Akkerman <[EMAIL PROTECTED]>: > > I'm trying to use @validate but it does not quite fit my needs. > Especially the fact that it automatically calls htmlfill which fails to > handle XHTML makes it a no-go. I do see a use for htmlfill behaviour, > but I'ld prefer if that happens as a separate step so you can easily > tune the exact behaviour. The standard case would be something like: > > @htmlfill > @validate(form="myform") > def action(self): > .... > > if you want to let your designers handle errors instead of asking > developers to produce html (which tends to result in horribly html) > you can just do this: > > @validate(form="myform") > def action(self): > .... >
try to do: @validate(schema, form="myform", auto_insert_errors=False) def action(self): .... The parameter docs: http://formencode.org/module-formencode.htmlfill.html This put the error class in invalid fields, but not an horrible text message ;-) This is only a workaround. You are right. Your example is more flexible. Reggards: Javi PD: Excuse me my poor english --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~----------~----~----~----~------~----~------~--~---
