correct. multiple is intended to be used for reference fields that store integers. You can replace:
IS_IN_SET(('Glasses', 'Soft Contacts','Hard Contacts', 'Other', 'None')) with IS_IN_SET(range(4),('Glasses', 'Soft Contacts','Hard Contacts', 'Other')) None should not be an option becase you can select none of the items. On Oct 7, 3:15 pm, Thadeus Burgess <thade...@thadeusb.com> wrote: > It seems as if there is a space in the text, then it will not pass > validation if one of the options with a space is selected. > > def test(): > form = SQLFORM.factory( > Field('field', requires=IS_IN_SET(('Glasses', 'Soft Contacts', > 'Hard Contacts', 'Other', 'None'), multiple=True, error_message="Must be in > set")) > ) > > if form.accepts(request.vars, session): > response.flash = "Accepted" > if form.errors: > response.flash = "Errors" > > return dict(form=form) > > -Thadeus --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---