[Product-Developers] registering a standard validator

Andreas Jung lists at zopyx.com
Sat Aug 16 16:35:19 UTC 2008



--On 16. August 2008 18:27:45 +0200 Andreas Petermann 
<petepetermann at googlemail.com> wrote:

> Hi list,
> i am new to plone and i am wondering if it is possible to add a standard
> validator to every field without adding it to the field definitions?

Why not?

> I
> know it is possible to define a new field class which uses the special
> validator as the default one but i do not want to define for every
> existing field a new one.

Declaring a validator for each field is just one-line-more within the field 
definition within a schema...possibly less work than writing this posting.
The field definition should explicitly define a field in one place - this 
includes the definition of the validators - except you implementation 
validation on the application - either through one of the various AT hooks 
or through validate_XXX() methods.

-aj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 194 bytes
Desc: not available
URL: <http://lists.plone.org/pipermail/plone-product-developers/attachments/20080816/38a66b50/attachment.asc>


More information about the Product-Developers mailing list