Ticket #3578: 3578_newforms_emailfield_maxlength_fix.diff
File 3578_newforms_emailfield_maxlength_fix.diff, 571 bytes (added by , 17 years ago) |
---|
-
django/newforms/fields.py
327 327 if not self.regex.search(value): 328 328 raise ValidationError(self.error_message) 329 329 return value 330 331 def widget_attrs(self, widget): 332 if self.max_length: 333 return {'max_length': str(self.max_length)} 330 334 331 335 email_re = re.compile( 332 336 r"(^[-!#$%&'*+/=?^_`{}|~0-9A-Z]+(\.[-!#$%&'*+/=?^_`{}|~0-9A-Z]+)*" # dot-atom