AjaxSelectWidget limit 'lenght'

Is it somehow possible to limit AjaxSelectWidget to 1 or 2 entries?
( in this case, one or two names)

directives.widget(
    "parents", AjaxSelectWidget,  
    limit=2,
    allow_multiple=False, 
    vocabulary="plone.app.vocabularies.Users"
)

(if two is not possible, I will use two fields (parent-1 and parent-2)

You can use a validator to check the length.