In Validator section of Chapter 7, the example for IS_DATE_IN_RANGE
incorrectly uses IS_DATETIME where IS_DATE_IN_RANGE is expected:
requires = IS_DATE(format=T('%Y-%m-%d'),
minimum=datetime.date(2008,1,1),
maximum=datetime.date(2009,12,31),
error_message=T('must be YYYY-MM-DD!'))
should be:
requires = IS_DATE_IN_RANGE(format=T('%Y-%m-%d'),
minimum=datetime.date(2008,1,1),
maximum=datetime.date(2009,12,31),
error_message=T('must be YYYY-MM-DD!'))
The same error occured in the IS_DATETIME_IN_RANGE validator example:
requires = IS_DATE(format=T('%Y-%m-%d'),
minimum=datetime.date(2008,1,1),
maximum=datetime.date(2009,12,31),
error_message=T('must be YYYY-MM-DD!'))
should read as:
requires = IS_DATETIME_IN_RANGE(format=T('%Y-%m-%d'),
minimum=datetime.date(2008,1,1),
maximum=datetime.date(2009,12,31),
error_message=T('must be YYYY-MM-DD!'))
hth