What about a nested validation_error function. For example:


    @turbogears.expose( validators= mySchema() )
    def index( self, arg1, arg2 )
        def validation_failed( errors ):
            # do something clever here and ultimately
            # either retry index or bail
            pass

        # real code for index
        pass


Is it legal to have a self parameter for the nested function? If so, I guess we'll have to pass it along explicitly when calling the nested validation_failed function.

Of course, if no validation_failed function is defined, the class- based one should be tried next.



--
Jeff Watkins
http://metrocat.org/

"Advertising directed at children is inherently deceptive and exploits children under eight years of age."
-- American Academy of Pediatrics

Reply via email to