Oh, I see.
I always override them all as following:

    email = formencode.validators.Email(not_empty=True,
use_builtins_gettext=False, messages=dict((key, "Invalid email address.")
for key in ["empty", "noAt", "badUsername", "socketError", "badDomain",
"domainDoesNotExist"]))


On Sun, May 9, 2010 at 9:24 PM, Haron Media <[email protected]> wrote:

>
> > Email validator defines following messages, and you can override them
> > as the sample.
> >     messages = {
> >         'empty': _('Please enter an email address'),
> >         'noAt': _('An email address must contain a single @'),
> >         'badUsername': _('The username portion of the email address is
> > invalid (the portion before the @: %(username)s)'),
> >         'socketError': _('An error occured when trying to connect to
> > the server: %(error)s'),
> >         'badDomain': _('The domain portion of the email address is
> > invalid (the portion after the @: %(domain)s)'),
> >         'domainDoesNotExist': _('The domain of the email address does
> > not exist (the portion after the @: %(domain)s)'),
> >         }
> >
>
>
> That's the problem, I don't want to have to specify 6 messages. I want
> single, "Invalid email address." to be used.
>
> --
> You received this message because you are subscribed to the Google Groups
> "pylons-discuss" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<pylons-discuss%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/pylons-discuss?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" 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/pylons-discuss?hl=en.

Reply via email to