Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(11)  |  Call(5)  |  Derive(0)  |  Import(6)
Validate an email address.

If you pass ``resolve_domain=True``, then it will try to resolve
the domain name to make sure it's valid.  This takes longer, of
course.  You must have the `pyDNS <http://pydns.sf.net>`__ modules
installed to look up DNS (MX and A) records.

::

    >>> e = Email()(more...)

src/m/e/mediadrop-HEAD/mediadrop/forms/admin/media.py   mediadrop(Download)
from mediadrop.lib.filetypes import registered_media_types
from mediadrop.lib.i18n import N_, _
from mediadrop.forms import FileField, Form, ListForm, SubmitButton, TextArea, TextField, XHTMLTextArea, email_validator
from mediadrop.forms.admin.categories import CategoryCheckBoxList
from mediadrop.model import Category, DBSession, Podcast
        TextField('title', label_text=N_('Title'), validator=TextField.validator(not_empty=True), maxlength=255),
        TextField('author_name', label_text=N_('Author Name'), maxlength=50),
        TextField('author_email', label_text=N_('Author Email'), validator=email_validator(not_empty=True), maxlength=255),
        XHTMLTextArea('description', label_text=N_('Description'), attrs=dict(rows=5, cols=25)),
        CategoryCheckBoxList('categories', label_text=N_('Categories'), options=lambda: DBSession.query(Category.id, Category.name).all()),

src/m/e/mediadrop-HEAD/mediadrop/forms/admin/podcasts.py   mediadrop(Download)
from tw.forms.validators import NotEmpty
 
from mediadrop.forms import ListForm, ListFieldSet, SubmitButton, TextField, XHTMLTextArea, email_validator
from mediadrop.lib.i18n import N_, _
from mediadrop.plugin import events
        TextField('subtitle', label_text=N_('Subtitle'), maxlength=255),
        TextField('author_name', label_text=N_('Author Name'), validator=TextField.validator(not_empty=True), maxlength=50),
        TextField('author_email', label_text=N_('Author Email'), validator=email_validator(not_empty=True), maxlength=50),
        XHTMLTextArea('description', label_text=N_('Description'), attrs=dict(rows=5, cols=25)),
        ListFieldSet('details', suppress_label=True, legend=N_('Podcast Details:'), css_classes=['details_fieldset'], children=[

src/m/e/mediadrop-HEAD/mediadrop/forms/uploader.py   mediadrop(Download)
 
from mediadrop.lib.i18n import N_
from mediadrop.forms import ListForm, TextField, XHTMLTextArea, FileField, SubmitButton, email_validator
from mediadrop.plugin import events
 
    class fields(WidgetsList):
        name = TextField(validator=validators['name'], label_text=N_('Your Name:'), maxlength=50)
        email = TextField(validator=email_validator(not_empty=True), label_text=N_('Your Email:'), help_text=N_('(will never be published)'), maxlength=255)
        title = TextField(validator=validators['title'], label_text=N_('Title:'), maxlength=255)
        description = XHTMLTextArea(validator=validators['description'], label_text=N_('Description:'), attrs=dict(rows=5, cols=25))

src/m/e/mediadrop-HEAD/mediadrop/forms/admin/users.py   mediadrop(Download)
from tw.forms.validators import All, FancyValidator, FieldsMatch, Invalid, NotEmpty, PlainText, Schema
 
from mediadrop.forms import ListFieldSet, ListForm, SubmitButton, TextField, email_validator
from mediadrop.lib.i18n import N_, _
from mediadrop.model import DBSession
    fields = [
        TextField('display_name', label_text=N_('Display Name'), validator=TextField.validator(not_empty=True), maxlength=255),
        TextField('email_address', label_text=N_('Email Address'), validator=email_validator(not_empty=True), maxlength=255),
        ListFieldSet('login_details', suppress_label=True, legend=N_('Login Details:'),
            css_classes=['details_fieldset'],

src/m/e/mediadrop-HEAD/mediadrop/forms/admin/settings.py   mediadrop(Download)
    Int, OneOf, Regex, StringBool)
 
from mediadrop.forms import (FileField, ListFieldSet, ListForm,
    SubmitButton, TextArea, TextField, XHTMLTextArea,
    email_validator, email_list_validator)

src/m/e/mediadrop-HEAD/mediadrop/forms/comments.py   mediadrop(Download)
from formencode import Schema
 
from mediadrop.forms import TextField, XHTMLValidator, email_validator
from mediadrop.lib.i18n import N_
 
class PostCommentSchema(Schema):
    name = TextField.validator(not_empty=True, maxlength=50,
        messages={'empty': N_('Please enter your name!')})
    email = email_validator()