#11907: EmailField should run strip() -----------------------+---------------------------------------------------- Reporter: whatcould | Owner: nobody Status: new | Milestone: Component: Forms | Version: 1.1 Keywords: | Stage: Unreviewed Has_patch: 0 | -----------------------+---------------------------------------------------- The EmailField should run strip() to remove opening and trailing spaces before the validation is run. Copying and pasting an email can easily pick up a trailing space (I did it myself today).
The code would be something like this, from forms.fields.EmailField. (My first python, sorry if it's ugly, I'm a rubyist.) {{{ def clean(self, value): value = value.strip() value = super(RegexField, self).clean(value) return value }}} -- Ticket URL: <http://code.djangoproject.com/ticket/11907> Django <http://code.djangoproject.com/> The Web framework for perfectionists with deadlines. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-updates@googlegroups.com To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-updates?hl=en -~----------~----~----~----~------~----~------~--~---