Can you try this instead?

db.client.policy_N.requires=IS_NOT_IN_DB(db, 'client.id'*)*

-Jim
On Wednesday, December 8, 2021 at 11:37:25 PM UTC-6 mostwanted wrote:

> 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 web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/524e9475-5332-4742-a831-c7955681872dn%40googlegroups.com.

Reply via email to