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'*)*
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/web2py/d4ea5ecd-851f-4a4e-9d7c-f874f1e14a84n%40googlegroups.com.