Thank you - for login it works but for register it does not.

In the case of register the validator executes after register and register
is telling the email is invalid.

On Sun, Dec 18, 2011 at 6:44 PM, Anthony <abasta...@gmail.com> wrote:

> Problem is the login() function automatically replaces the email
> validator(s) with its own temporary validator, so you'll lose the IS_LOWER
> in that case. That should probably be fixed, but for now, the alternative
> is to use an onvalidation function for login.
>
> Anthony
>
>
> On Sunday, December 18, 2011 7:40:08 PM UTC-5, ニコノコ wrote:
>>
>> Couldn't you just add something like this?
>> #in your db.py, after auth.define_tables()
>> db.auth_user.email.requires=(**IS_LOWER(),IS_EMAIL(),IS_NOT_**
>> IN_DB(db,'auth_user.email'))
>>
>> Or if you use customize your auth tables ...:
>> Field('email', length=512,default='',comment=**'*'
>>                        ,requires=(IS_LOWER(),IS_**
>> EMAIL(),IS_NOT_IN_DB(db,'auth_**user.email')))
>>
>>
>> On Friday, December 16, 2011, Anthony wrote:
>>
>>> def user():
>>>     if request.args(0) == 'register':
>>>         db.auth_user.email.requires.**insert(0, IS_LOWER())
>>>     [rest of code]
>>>
>>> Note, the above assumes there is already at least one validator defined
>>> for the email field (which there should be by default) -- otherwise, just
>>> do requires=...
>>>
>>> Anthony
>>>
>>> On Thursday, December 15, 2011 5:09:37 PM UTC-5, thstart wrote:
>>>>
>>>> could you please post a code how to that for register especially?
>>>
>>>

Reply via email to