Previously Jonathan Vanasco wrote: > do you think that could be incorporated with this ticket/request i > filed: > > http://pylonshq.com/project/pylonshq/ticket/398
I can't check, looks like the pylons issue tracker is down. > my issue with the current validate, is that it does validate + > redirect on error > > i'd like to see it split apart, so you can the error action on a > successful form that further processing deemed wrong validate does lots of things: - it extract parameters from a request according to a defined schema - it validates the decoded data - it optionally redirect the request elsewhere if validation fails - it transform the response to insert form values and error messages At the moment you get all four in one decorator. If you want a subset of them you have to code the whole thing yourself. I'm not sure what the best way to make that more modular - we don't want to make the common case more complex for developers. Making the last part optional feels like a safe change to me: there are very good reasons to skip or do custom output transformation, while there appear to be enough options already to manage the first three. > ie: > @validate says 'form is ok' > your app logic says 'hmm... this zipcode isn't in this state', and > then you can trip the error That sounds like something that really should be a validator error. > this way you can make formencode work for you, instead of working for > formencode the validate decorator is part of pylons, not formencode. And validator is trying to work for you, but goes a bit too far in all its enthousiasm. Wichert. -- Wichert Akkerman <[EMAIL PROTECTED]> It is simple to make things. http://www.wiggy.net/ It is hard to make things simple. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
