db.define_table('person', Field('name', unique=True)) |
Sets the query
recent = db(db.person.registration_stamp>now-datetime.timedelta(10))
db.person.name.requires = IS_NOT_IN_DB(recent, 'person.name')
Record field
recent = db(db.person.registration_stamp>now-datetime.timedelta(10))
db.person.name.requires = IS_NOT_IN_DB(recent, 'person.name')
IS_NOT_IN_DB('...', error_message='value already in database or empty','...')
IS_NOT_IN_DB('...', allowed_override=['Tom','Jerry'], '...')
IS_NOT_IN_DB('...', ignore_common_filters=True)
" Web2py Book"