Hi All,
The following table definition does not work all the time. Sometimes
it gives the following error: IntegrityError: column name is not
unique. I want to receive the error at the form level.
db.define_table('testtable',
Field('name', 'text', unique=True, notnull=True),
migrate=True)
db.testtable.name.requires=IS_NOT_EMPTY()
db.testtable.name.requires=IS_NOT_IN_DB(db, db.testtable.name)
db.testtable.name.requires = IS_ALPHANUMERIC()
Note: If I comment db.testtable.name.requires = IS_ALPHANUMERIC(), I
can get the error at the form level.
Did anybody observe this behavior? I am using sqlite database.