[web2py] IS_IN_SET validator

2011-11-21 Thread villas
This example is given in the validators section of the book: requires = [IS_INT_IN_RANGE(0, 8), IS_IN_SET([2, 3, 5, 7], error_message='must be prime and less than 10')] It does not seem to work. If I attempt to combine IS_IN_SET with any other validator, the dropdown list doesn't work.

Re: [web2py] IS_IN_SET validator zero option

2011-09-01 Thread Bruno Rocha
db.define_table('plan', Field('id','id'), Field('option',type='string',label=T('Subscription Options')), format='%(option)s', migrate=settings.migrate) db.define_table('subscription', Field('id',

[web2py] IS_IN_SET validator zero option

2011-09-01 Thread hu5ndy hu5ndy
Is there any way to use the IS_IN_SET validator zero option with a db field that is tied to a lookup table? For example, if I have db.define_table('plan', Field('id','id'), Field('option',type='string',label=T('Subscription Options')), format=

[web2py] IS_IN_SET validator not working as expected

2011-06-10 Thread selecta
i have the model db.define_table( 'foobar', Field('open', 'boolean', requires = IS_IN_SET([(True, 'open'), (False, 'closed')], zero = None), default = True, widget=SQLFORM.widgets.radio.widget), ) and the controller def edit(): return crud.update(db.foobar, request.args(0), deletable = Fal

[web2py] IS_IN_SET validator

2010-12-30 Thread Manu
Hi , I have a database which contains a list:string field type and a requirement to be in a set of value ( with IS_IN_SET AND multiple=True ) . My question is how would you dynamically generate this set( my categories are stored in another table ) ? What i am trying to do is to allow user to sel