On Oct 21, 8:47 am, Ian Bicking <[EMAIL PROTECTED]> wrote:
> FormEncode is overdue for a release, but before that a request: there
> has been some mention that FormEncode should ship more useful form
> validators.  For instance, FieldsMatch is an example of something
> currently shipped, but about the only example.  Other examples would be
> helpful.  Probably also something generic to do easy whole-dict
> validation would be quite helpful.
>
> Do people have classes or recipes they've written that are general
> enough to include directly in FormEncode?  If so, please contribute!
> Realistic examples in the docstrings will be very helpful.
>
> --
> Ian Bicking : [EMAIL PROTECTED] :http://blog.ianbicking.org


#to check whether a given email id is correct

import formencode
from formencode import validators

pattern = validators.Email()
email_id = [EMAIL PROTECTED]
try:
    if pattern.to_python(email_id):
        return True
except:
    return False



>               : Write code, do good :http://topp.openplans.org/careers


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to