requires = IS_DATE_IN_RANGE(format=T('%Y-%m-%d'), |
It is good practice to specify the format using the translation operator, in order to support different formats in different locales.
requires = IS_DATE_IN_RANGE(format=T('%Y-%m-%d'), ...)
Sets the minimum date
requires = IS_DATE_IN_RANGE(..., minimum=datetime.date(2008,1,1), ...)
Maximum date
requires = IS_DATE_IN_RANGE(...,maximum=datetime.date(2009,12,31) )
Display error message
requires = IS_DATE_IN_RANGE(..., error_message='must be YYYY-MM-DD!')