Upon further investigation I looked at validators.py to make sure I
was passing IS_IN_SET() the data it is looking for.

A list of tuples should be no problem.  I suspect it must be either
the '#' or the ':' that's the problem.

1) Am I correct in assuming that it shouldn't matter if everything in
my list of tuples are strings?

I also tried passing a list of dicts to IS_IN_SET() and get the same
LazyT 'value not allowed' error.

2) How can I pass the following to IS_IN_SET?

data = [ ('#2:7', 'Sir Gallahad'), ('#3:3', 'Lancealot'), ('#5:6',
'Sir Robin') ]

form = SQLFORM.factory(Field('monty', requires=IS_IN_SET(data))
if form.accepts.......
    actually accept data and do something, anything
elif form.errors:
    response.flash = repr(form.errors)

I would greatly appreciate it if anyone could point me in the right
direction.  Thank you in advance for your time.

-David

Reply via email to