[Zope3-dev] field validation in edit form

Garrett Smith garrett@mojave-corp.com
Sat, 12 Jul 2003 14:23:51 -0500


Why is the edit form configure *not* to validate field input? This is
hard coded at line 150 of zope/app/browser/form/editview.py -- see
'strict':

data =3D getWidgetsData(self, self.schema,
    strict=3DFalse,
    set_missing=3DTrue,
    names=3Dself.fieldNames,
    exclude_readonly=3DTrue)

At the least, I would expect this to be configurable by a subclass.
Ideally this would also be exposed in the editform directive.

Does anyone have a problem if I add a class attribute 'validateData' and
change the above to:

data =3D getWidgetsData(self, self.schema,
    strict=3Dself.validateData,
    set_missing=3DTrue,
    names=3Dself.fieldNames,
    exclude_readonly=3DTrue)

 -- Garrett