Try IS_IN_DB(..., multiple=(0, 3))
The "multiple" argument to IS_IN_SET and IS_IN_DB can be a list or tuple specifying a minimum and maximum number of items to be selected (strictly less than on the max, so set the max to 3 to make sure there are no more than 2). Anthony On Wednesday, December 14, 2011 11:19:40 PM UTC-5, ニコノコ wrote: > > I have a list:reference field and would like a user to select none or up > to two values from the list > > I could validate by calling onvalidation but I'm wondering if there's any > built-in validator that should work? I've tried the following, none of > which worked for me: > > - IS_LENGTH(minsize=0,maxsize=2) > - IS_EXPR('len(value)<=2') > > > >