[Zope3-dev] field validation in edit form
Richard Jones
richard@commonground.com.au
Sun, 13 Jul 2003 09:53:23 +1000
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Sunday, July 13, 2003, at 05:23 AM, Garrett Smith wrote:
> 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 = getWidgetsData(self, self.schema,
> strict=False,
> set_missing=True,
> names=self.fieldNames,
> exclude_readonly=True)
The standard EditView doesn't validate data - the Widgets comprising
that view do so (via the Fields that they represent). To perform
View-level validation (eg. validating fields against each other) you'll
need to write your own View which performs that additional validation
after the getWidgetsData call.
Note that the standard EditView won't be *using* getWidgetsData Real
Soon. See my other post about that for more info though.
Richard
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (Darwin)
iD8DBQE/EJ95rGisBEHG6TARApuNAJ9UYSC4ukPhNwIwgWUCJe6rwgAp9ACfWGzW
sxMbtvqY0iD8IILq4MGVZPU=
=AXNY
-----END PGP SIGNATURE-----