diff --git a/VERSION b/VERSION index fd524df8..19af10b9 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.8.2-stable+timestamp.2014.01.08.11.31.12 +Version 2.8.2-stable+timestamp.2014.01.08.13.42.47 diff --git a/gluon/validators.py b/gluon/validators.py index 436e96c0..c9a20e33 100644 --- a/gluon/validators.py +++ b/gluon/validators.py @@ -2462,14 +2462,18 @@ class IS_LIST_OF(Validator): if not self.maximum is None and len(ivalue) > self.maximum: return (ivalue, translate(self.error_message) % dict(min=self.minimum, max=self.maximum)) new_value = [] + other = self.other if self.other: + if not isinstance(other, (list,tuple)): + other = [other] for item in ivalue: if item.strip(): - (v, e) = self.other(item) - if e: - return (ivalue, e) - else: - new_value.append(v) + v = item + for validator in other: + (v, e) = validator(v) + if e: + return (ivalue, e) + new_value.append(v) ivalue = new_value return (ivalue, None)