Hi David,

Has anyone used formlib validators? What is the proper technique? I do not seem to be having any success.

i use formlib validator in the following way:

class ChangePassword(form.PageForm):

    def validate_change_passwd(self, action, data):
        errors = self.validate(action, data)
        # test password
        if not errors:
            if data['password'] != data['confirmPassword']:
                errors = (_(u"Password and confirmation didn't match"),)
        return errors

    @form.action(u"Change", validator=validate_change_passwd)
    def handle_change_passwd(self, action, data):

Stefan Martin

Zope3-users mailing list

Reply via email to