Ok, but if the default validator for a list:reference field does allow zero 
options to be selected, required=True and required=False makes no 
difference, isn't it ?
 
Thanks,
Mirko

On Monday, September 2, 2013 3:15:18 PM UTC+2, Anthony wrote:

> Note, IS_IN_DB(..., multiple=True), which is the default validator for a 
> list:reference field, does allow zero options to be selected, so I suppose 
> the behavior of required=True was made consistent with the validator. 
> Perhaps that should be changed. In any case, using the validator, you can 
> do:
>
> IS_IN_DB(db, 'mytable.id', db.mytable._format, multiple=[1, float('inf')])
>
> The "multiple" argument to IS_IN_DB and IS_IN_SET can be a list/tuple 
> specifying minimum and maximum number of values.
>
> Anthony
>
> On Monday, September 2, 2013 5:31:33 AM UTC-7, Mirko wrote:
>>
>> Hi,
>> I expected this to be validated when at least one entry is selected 
>> but validation let this pass when nothing is selected.
>> Any ideas ?
>>  
>> Thanks,
>> Mirko
>>  
>> PS: after validation, the correponding db field contains "||" which may 
>> be should be considered as an empty value by the DAL ?
>>  
>>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to