Ticket #3038: forms.patch
File forms.patch, 617 bytes (added by , 18 years ago) |
---|
-
django/newforms/fields.py
163 163 Field.clean(self, value) 164 164 if value in EMPTY_VALUES: value = u'' 165 165 value = smart_unicode(value) 166 if not self.regex.search(value): 167 raise ValidationError(self.error_message) 166 if self.required or value: 167 if not self.regex.search(value): 168 raise ValidationError(self.error_message) 168 169 return value 169 170 170 171 email_re = re.compile(