Actually I've already put a query in it. Currently it ready all active users as follows
db.table.input_email.requires=IS_IN_DB(db(db.all_users.status==1), 'all_users.username') And I want to further some users based on their name say John so the condition should fulfill all active users but John. Something like db.table.input_email.requires=IS_IN_DB(db(db.all_users.status==1 & db.all_users.username!='John' ), 'all_users.username') But I'm unable to achieve this. On Wednesday, July 12, 2017 at 5:25:22 PM UTC+5:30, 黄祥 wrote: > > i think you can put query on that > e.g. > db.person.name.requires = IS_IN_DB(db(db.person.id > 10), 'person.id', > '%(name)s') > > ref: > > http://web2py.com/books/default/chapter/29/07/forms-and-validators#Database-validators > > best regards, > stifan > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- 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/d/optout.