On Oct 22, 6:01 am, vimal <[EMAIL PROTECTED]> wrote: > #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
That just seems like a pattern to generally turn a validator/converter object into purely a validation function. I suppose something like that could exist, but you'd be missing out on a lot of what many FormEncode validators provide. Ian --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

