I created a behavior with the following field definition:
mfolder = schema.Choice(
title=u"Source Folder Mobile",
vocabulary='plone.app.vocabularies.Catalog',
required=False,
)
directives.widget('mfolder'
, RelatedItemsFieldWidget
, pattern_options={
'recentlyUsed': True,
'mode': 'search',
'maximumSelectionSize': 1,
'selectableTypes': ['Folder'],
}
)
The choice should not be required. It works fine if I select a content relation, but leaving it empty responses with:
"Constraint not satisfied"
What am I doing wrong.
Plone 5.2.9
plone.app.z3cform 3.2.4