i try to make a formlib action with an validator.

My environment is

Zope 2.10.4
Five 1.4.4
plone.app.form branch 2.5

This is my method:

    def validate_change_passwd(self, action, data):
        errors = self.validate(action, data)
        # test password
        from zope.app.form.interfaces import WidgetInputError
        if not errors:
            if data['passwort'] != data['confirm']:
errors = WidgetInputError(field_name='passwort', widget_title=_(u'Passwort'), errors=_(u'Foo'))
        return errors

    @form.action(_(u'Speichern'), validator=validate_change_passwd)
    def action_resutls(self, action, data):

What do i have to return to display a error message on my form?

I try everything but i donĀ“t get it to work

maybe someone has an tip for me


Zope3-users mailing list

Reply via email to