yes, i'm sorry, i forgot to show the requires too for field gender (because 
i set the type as list string)
please add this code below in models/db.py :

custom_auth_table=db[auth.settings.table_user_name]
custom_auth_table.gender.requires=IS_IN_SET(['Male', 'Female'])
custom_auth_table.address.requires=IS_NOT_EMPTY()
custom_auth_table.zip.requires=IS_MATCH('^\d{5,5}$',
                                        error_message='not a zip code')
custom_auth_table.city.requires=IS_NOT_EMPTY()
custom_auth_table.country.requires=IS_NOT_EMPTY()
custom_auth_table.phone.requires=IS_NOT_IN_DB(db, custom_auth_table.phone)
custom_auth_table.company.requires=IS_IN_DB(db, db.company.id, 
'%(company_name)s')

auth.settings.table_user=custom_auth_table

-- 

--- 
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].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to