Ticket #3069: django_invalid_date_i18n.diff

File django_invalid_date_i18n.diff, 542 bytes (added by Bastian Kleineidam <calvin@…>, 18 years ago)
  • django/core/validators.py

     
    140140    try:
    141141        date(year, month, day)
    142142    except ValueError, e:
    143         raise ValidationError, gettext('Invalid date: %s.' % e)   
     143        msg = gettext('Invalid date: %s') % gettext(str(e))
     144        raise ValidationError, msg   
    144145
    145146def isValidANSIDate(field_data, all_data):
    146147    if not ansi_date_re.search(field_data):
Back to Top