On 20 Aug 2007, at 16:12 , Benji York wrote:
Philipp von Weitershausen wrote:
This is exactly what I would suggest: The function should return a list of validation errors. Similar semantics are used in zope.formlib's validate() method. I agree with Wichert's objection about being a bit confusing, though. Perhaps a better name than "validateSchema" could solve this problem, though I can't think of a good one right now... getValidationErrors() seems to naive...


I feel myself slipping into a bikeshed, so this may be my last comment on this.

I like "getValidationErrors". It's use would probably normally look something like this:

errors = getValidationErrors(...)
if errors:
    ...

or:

errors = getValidationErrors(...)
if not errors:
    ...

Both look good to me.

+1


_______________________________________________
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com

Reply via email to