I'm trying to use the validator
IS_NOT_IN_DB(
) but i keep getting the error below, what does it mean?
<type 'exceptions.Exception'> Validation error, field:policy_N
<pydal.validators.IS_NOT_IN_DB object at 0x0000015E7996E940>
MY CODE:
db.define_table('client',
Field('client_name'),
Field('id_number', requires = IS_MATCH('^\d{9}?$', error_message='An ID Number should have exactly 9 digits')),
Field('policy_N'),
Field('date_of_birth', 'date'),
Field('member_only', 'reference premium_for_member_only_family_policy'),
format="%(client_name)s"
)
db.client.policy_N.requires=IS_NOT_IN_DB(db,'db.client')