Ticket #10353: datetime_error_message.diff
File datetime_error_message.diff, 1.5 KB (added by , 16 years ago) |
---|
-
django/forms/fields.py
284 284 285 285 class DateField(Field): 286 286 default_error_messages = { 287 'invalid': _(u'Enter a valid date .'),287 'invalid': _(u'Enter a valid date in YYYY-MM-DD format.'), 288 288 } 289 289 290 290 def __init__(self, input_formats=None, *args, **kwargs): … … 318 318 class TimeField(Field): 319 319 widget = TimeInput 320 320 default_error_messages = { 321 'invalid': _(u'Enter a valid time .')321 'invalid': _(u'Enter a valid time in HH:MM[:ss[.uuuuuu]] format.') 322 322 } 323 323 324 324 def __init__(self, input_formats=None, *args, **kwargs): … … 357 357 class DateTimeField(Field): 358 358 widget = DateTimeInput 359 359 default_error_messages = { 360 'invalid': _(u'Enter a valid date/time .'),360 'invalid': _(u'Enter a valid date/time in YYYY-MM-DD HH:MM[:ss[.uuuuuu]] format.'), 361 361 } 362 362 363 363 def __init__(self, input_formats=None, *args, **kwargs): … … 846 846 widget = SplitDateTimeWidget 847 847 hidden_widget = SplitHiddenDateTimeWidget 848 848 default_error_messages = { 849 'invalid_date': _(u'Enter a valid date .'),850 'invalid_time': _(u'Enter a valid time .'),849 'invalid_date': _(u'Enter a valid date in YYYY-MM-DD format.'), 850 'invalid_time': _(u'Enter a valid time in HH:MM[:ss[.uuuuuu]] format.'), 851 851 } 852 852 853 853 def __init__(self, *args, **kwargs):