BTW, for the specific case there's IS_LIST_OF_EMAILS :P

On Wednesday, December 10, 2014 10:21:07 AM UTC+1, desta wrote:
>
> Thank you Manuele for the quick answer. Even though I read the 
> documentation I didn't understand that I could do that! Thank you for 
> pointing that out to me. It works great.
>
> Thanks again.
>
> On Wednesday, December 10, 2014 10:51:22 AM UTC+2, Manuele wrote:
>>
>>  Off course you can!
>>
>> http://web2py.com/books/default/chapter/29/07/forms-and-validators#Validators
>>
>> Check out the examples reported in doc for un derstanding the standard 
>> behaviour of validators, such as:
>>
>> >>> IS_MATCH('a')('ba')
>> ('ba', <lazyT 'invalid expression'>) # no pass
>> >>> IS_MATCH('a',strict=False)('ab')
>> ('a', None)                          # pass!
>>
>>
>> the second element of the output is expected to be an error message and 
>> if it's None the test is a passed!
>>
>> Cheers
>>
>>     Manuele
>>
>> Il 10/12/14 09:33, desta ha scritto:
>>  
>> Hi,
>>
>> web2py features some really useful validators. Is it possible to use them 
>> outside of forms? For example, lets assume a string that contains comma 
>> separated emails as inputted from the user. After splitting the string to 
>> extract individual emails, can I use the IS_EMAIL validator to validate 
>> each email?
>>
>> Thank you.
>>  -- 
>> 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.
>>
>>
>>  

-- 
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.

Reply via email to