Michael van Tellingen
2009-01-09 10:25:10 UTC
Hello everyone,
I always use the DateConverter for validating dates in my formencode
schemas. However i've recently tried upgrading to
formencode 1.2 but unfortunatly it doesn't support dashes as separators
anymore.
To summarize; the following did work in 1.1 but doesn't in 1.2:
validators.DateConverter(month_style='dd-mm-yyyy')
The offending code in 1.2 is:
def __init__(self, *args, **kw):
super(DateConverter, self).__init__(*args, **kw)
if not self.month_style in ('dd/mm/yyyy', 'mm/dd/yyyy'):
raise TypeError("Bad month_style: %r" % self.month_style)
Is it possible that this get's fixed in the trunk? Thanks ;-)
Regards,
Michael van Tellingen
I always use the DateConverter for validating dates in my formencode
schemas. However i've recently tried upgrading to
formencode 1.2 but unfortunatly it doesn't support dashes as separators
anymore.
To summarize; the following did work in 1.1 but doesn't in 1.2:
validators.DateConverter(month_style='dd-mm-yyyy')
The offending code in 1.2 is:
def __init__(self, *args, **kw):
super(DateConverter, self).__init__(*args, **kw)
if not self.month_style in ('dd/mm/yyyy', 'mm/dd/yyyy'):
raise TypeError("Bad month_style: %r" % self.month_style)
Is it possible that this get's fixed in the trunk? Thanks ;-)
Regards,
Michael van Tellingen