Yes you can do it but it is
db.ipo.sa.requires not db.ipo.SA.requires On Sep 13, 10:46 am, cogarg <[email protected]> wrote: > Is the following even possible? > > db = SQLDB('postgres://xx:x...@localhost:5432/xx') > dblink = SQLDB('postgres://yy:y...@localhost:5432/yy') > > db.define_table('ipo', > Field('sa',label=T('SA')), > Field('cr',db.auth_user,default=auth.user_id,writable=False), > Field('ep',label=T('EPI'),default=user_lastname)) > > dblink.define_table('ipo', Field('sa'), Field('cr'), Field('ep')) > > db.ipo.SA.requires = [ > IS_NOT_IN_DB(db, 'ipo.sa', error_message=T('Already in db') + '!'), > IS_NOT_IN_DB(dblink, 'ipo.sa', error_message=T('Already in dblink') + > '!') > ] > > Thanks in advance

