> The standard error message is:
> There were errors
'There were errors' is default 'status message' when there are some errors.
Do you have any custom template in use?

Please, take a look at:

around line 717 there is 'update' function that is interesting for you:

def update(self):
        self.form_reset = False

        data = {}
        errors, action = handleSubmit(self.actions, data, self.validate)
        self.errors = errors

        if errors:
            self.status = _('There were errors')
            result = action.failure(data, errors)
        elif errors is not None:
            self.form_reset = True
            result = action.success(data)
            result = None

        self.form_result = result

As you can see there is a call to 'handleSubmit' which in turn calls
validation function, that calls function to check invariants.
As a result in 'errors' list you should have your error message
from invariants. Seems for me that this message is there
because self.status is set to 'There were errors' (so 'errors'
list is not empty).
'errors' list is used by ZPT: pageform.pt to display errors by default.
That's why I asked if you have custom template...

If above doesn't help then... do you know 'pdb'?
I think you should use pdb to debug code and see what happens.
Just put line:

import pdb;pdb.set_trace()

into above 'update' method from 'form.py' after a call to handleSubmit
and check what is in errors list.

Read about pdb here:

Maciej Wisniowski
Zope3-users mailing list

Reply via email to