From 231fa489cbe35408dba0ee41253750a065fa1fff Mon Sep 17 00:00:00 2001 From: hectord Date: Fri, 1 Nov 2013 22:39:14 +0100 Subject: [PATCH] Translate the formatters for DATE/DATETIME_IN_RANGE validators --- gluon/validators.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gluon/validators.py b/gluon/validators.py index fed1c14d..0107e43a 100644 --- a/gluon/validators.py +++ b/gluon/validators.py @@ -2375,7 +2375,8 @@ class IS_DATE_IN_RANGE(IS_DATE): format=format, error_message=error_message, timezone=timezone) - self.extremes = dict(min=minimum, max=maximum) + self.extremes = dict(min=self.formatter(minimum), + max=self.formatter(maximum)) def __call__(self, value): ovalue = value @@ -2428,7 +2429,8 @@ class IS_DATETIME_IN_RANGE(IS_DATETIME): format=format, error_message=error_message, timezone=timezone) - self.extremes = dict(min=minimum, max=maximum) + self.extremes = dict(min=self.formatter(minimum), + max=self.formatter(maximum)) def __call__(self, value): ovalue = value