I cannot reproduce problem 1. There is nothing wrong in your code and 
something else is causing the problem. Are you sure the issue is that "A 
user can register without filling this field." or is it the users who 
registered before the contraint was introduced do not have a company field?

Problem 2. To fix that you need define your own auth_user table. If you do:

db.define_table('auth_user', ....)

before auth.define_tables() it should use yours.

On Tuesday, 3 December 2013 09:14:02 UTC-6, Gael Princivalle wrote:
>
> Hi.
>
> I've had extra fields to db.auth_user like that in db.py:
>
> auth = Auth(db)
> auth.settings.extra_fields['auth_user']= [Field('Company', 
> requires=IS_NOT_EMPTY()),Field('Phone')]
>
> Problem n°1, requires=IS_NOT_EMPTY() don't have any effect. A user can 
> register without filling this field.
>
> Problem n° 2, Company and Phone fields are in the form after passwords 
> field, I would like to change the fild order.
>
> How can I do it ?
>
> Thanks.
>

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

Reply via email to