Thanks for this Bruno. I was able to use your code/hint to craft my
own specialized validator. lol
Noel
On Sep 9, 3:06 pm, Bruno Rocha wrote:
> class IS_LIST(object):
> def __call__(self, value):
> mylist = value.split(",")
> for item in mylist:
> v
class IS_LIST(object):
def __call__(self, value):
mylist = value.split(",")
for item in mylist:
val, error = IS_INT_IN_RANGE(0,10)(item)
if error:
return (val, error)
return (mylist, None)
On Thu, Sep 8,
That worked! Thanks Bruno.
I wonder now if I can do further validation to ensure that all items
are integers and in a specific range. In particular, I wanted to use
the already available validator IS_INT_IN_RANGE. Something like:
IS_LIST(IS_INT_IN_RANGE(0, 10))
It is hacking time.
:)
On Se
3 matches
Mail list logo