The code you have below works fine. I guess the question is how to do IS_IN_DB and IS_NOT_IN_DB at the same time for the same field. Is that the question? If so: you cannot unless you define your own validator. I agree there should be an option to do it and I can add one.
massimo On Jun 20, 8:34 pm, DenesL <denes1...@yahoo.ca> wrote: > Massimo, this simple scenario should be possible, but how?. > > model: > db.define_table('person',SQLField('name')) > db.define_table('project',SQLField('name')) > db.define_table('relation', > SQLField('person_id','reference person'), > SQLField('project_id','reference project')) > db.relation.person_id.requires=IS_IN_DB(db,db.person.id,'%(name)s') > db.relation.project_id.requires=IS_IN_DB(db,db.project.id,'%(name)s') --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" 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 -~----------~----~----~----~------~----~------~--~---