[Zope3-dev] Re: Field binding considered icky

Martijn Faassen faassen at infrae.com
Tue Apr 6 08:03:49 EDT 2004


Fred Drake wrote:
> On Monday 05 April 2004 02:51 pm, Martijn Faassen wrote:
>  > +1. The adapter should then call the original field validate method
>  > first, and then add to it. I think it should only add to the validation
>  > process, never alter it. This makes it easier to reason about such
>  > adapters.
> 
> If this is the "right thing," then perhaps the field's validate() should 
> always be called, and the adapter only checked for and used after that 
> passes.  Unless you expect the adapter to transform the data before calling 
> the field's validate()....?

You're right, that sounds even better. Transformation is not involved in 
validation, only value checking, so that should be fine.

Regards,

Martijn




More information about the Zope3-dev mailing list