[Zope-CMF] validateMetadata

Tres Seaver tseaver@zope.com
Mon, 31 Dec 2001 13:28:45 -0500


Antwan Reijnen wrote:

> I have a question: is validateMetadata in the portal_metadata
> tool ever called? Should I call it myself when editing my metadata?
> 
> Because: If I setup a required subject in portal_metadata, with an
> enforced vocabulary, and I enter a random subject (not in the
> vocabulary), this subject is stored normally. No MetadataError or
> other compaints are raised here...
> 
> Any help or pointers are appreciated.


Your suspicion is correct;  the method is not called by any
"out-of-the-box" CMF skins.  I would customize the 'metadata_edit'
PythonScript and have it call 'validateMetadata' after calling
'editMetadata'.


> Greetings, HAPPY NEWYEAR!!!


To you and yours, as well.


Tres.
-- 
===============================================================
Tres Seaver                                tseaver@zope.com
Zope Corporation      "Zope Dealers"       http://www.zope.com