I dont know if it is the "proper" way,
but when I return an empty string there is no validation error.

This was also one of the strangest things I found out with formlib.....

Dennis

Martin Aspeli escribió:
Hi,

I really thought I knew how to do this, but now I can't get it to work and I'm really confused.

I have a formlib EditForm, with an action like this:

    @form.action("Cancel", validator=lambda *args, **kwargs: True)
    def handle_cancel_action(self, action, data):
        nextURL = self.nextURL()
        if nextURL:
            self.request.response.redirect(self.nextURL())
        return ''

However, I still get validation errors when I click Cancel. I also tried a validator to return None, and no validator at all, and "validator=None", they all have the same effect.

Is there a proper/easy way of doing this?

Martin

_______________________________________________
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users



_______________________________________________
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users

Reply via email to