Re: [web2py] Re: Validator for sqlform combo list

2012-05-31 Thread José Luis Redrejo Rodríguez
Thanks very much Anthony, I didn't know this feature. 2012/5/31 Anthony : > db.class_attendant.person_id.requires = IS_IN_DB(db(db.person.age >= 18), > >     'person.id', '%(name)s %(surname)s') > > The first argument to IS_IN_DB and IS_NOT_IN_DB can be a Set object rather > than an entire db conn

[web2py] Re: Validator for sqlform combo list

2012-05-31 Thread Anthony
db.class_attendant.person_id.requires = IS_IN_DB(db(db.person.age >= 18), 'person.id', '%(name)s %(surname)s') The first argument to IS_IN_DB and IS_NOT_IN_DB can be a Set object rather than an entire db connection. See http://web2py.com/books/default/chapter/29/7#Database-validators. Antho