You have to make your own validator. Should we add a "range" attribute
to IS_IN_SET multiple?

On Nov 1, 9:40 pm, Richard <[email protected]> wrote:
> I came across the same problem.
>
> I want the user to choose 1 or more items from the set.
> If I choose multiple=True it allows 0 or more selected, but if I add
> IS_NOT_EMPTY() then the drop down list is not used.
>
> Do I need to handle this use case explicitly in the controller?
>
> On Oct 14, 12:34 am, DenesL <[email protected]> wrote:
>
> > By design the dropdown is only created on single requires, not lists
> > of them.
>
> > But you only need IS_IN_SET in this case, the field can not be empty
> > unless that is one the options in the set.
>
> > On Oct 13, 6:04 am, "Michael - afewtips.com" <[email protected]>
> > wrote:
>
> > > Hi,
> > > I am trying to use 2 different criteria but when I do, the drop down
> > > list doesn't show up any longer.
>
> > > SQLField('field','string',requires=[IS_NOT_EMPTY(),IS_IN_SET
> > > (['Val1','Val2','Val3'])])
>
> > > A couple of examples I saw used this format.
>
> > > Is this the correct syntax?
>
> > > Thanks
> > > Michael
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to