Try
http://www.web2py.com/books/default/chapter/29/07/forms-and-validators#onvalidation
the example is pretty clear.
On Saturday, October 24, 2015 at 8:28:15 PM UTC-4, Upendra Kumar wrote:
>
> I have made a 'user_details' table whose 'user_id' field I have referenced
> to default 'auth_user' table. Now after registration, I show the user his
> profile and ask him to complete it. But, the problem is that how can I
> check if the profile is complete or not after the user submits the updated
> profile.
>
> Here is my user_details table,
>
> db.define_table('user_details',
> Field('user_id'),
> Field('gender',requires=IS_IN_SET(['Male','Female','Other'])),
> Field('phone_number',requires=IS_MATCH('\d{10}')),
> Field('preferred_mess'),
> Field('preferred_caterer'),
> Field('state_name','string'),
> Field('account_initial_balance'),
> Field('account_curr_balance'),
> Field('your_booking_preference',requires=IS_IN_SET(['''Don't Book Food
> Automatically''','Book Food Automatically'])))
>
>
>
>
--
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].
For more options, visit https://groups.google.com/d/optout.