Ticket #11907: 11907.diff

File 11907.diff, 535 bytes (added by krisneuharth, 5 years ago)

Patch for #11907

  • django/forms/fields.py

     
    414414        'invalid': _(u'Enter a valid e-mail address.'),
    415415    }
    416416    default_validators = [validators.validate_email]
     417
     418    def clean(self, value):
     419        value = value.strip()
     420        value = super(EmailField, self).clean(value)
     421        return value
    417422
    418423class FileField(Field):
    419424    widget = FileInput
Back to Top