Commits

lestatcheb  committed 39fdd9b

small gettext fixes for validation errors

  • Participants
  • Parent commits dda48d6

Comments (0)

Files changed (1)

File wtforms/fields/core.py

                 self.data = datetime.datetime.strptime(date_str, self.format)
             except ValueError:
                 self.data = None
-                raise
+                raise ValueError(self.gettext(u'Not a valid datetime value'))
 
 
 class DateField(DateTimeField):
                 self.data = datetime.datetime.strptime(date_str, self.format).date()
             except ValueError:
                 self.data = None
-                raise
+                raise ValueError(self.gettext(u'Not a valid date value'))
 
 
 class FormField(Field):