I problem I see it that you have a set of float options but size1/size2 are 
text fields.
perhaps you want 

SIZES = [str(x*0.05) for x in range(0,int(25/0.05))]

or

Field('size1','float'),
...
db.product.size1.requires=IS_EMPTY_OR(IS_FLOAT_IN_RANGE()),IS_EMPTY_OR(IS_IN_SET(SIZES))






On Friday, 21 June 2013 17:19:51 UTC-5, greenpoise wrote:
>
> SO, I have this:
>
> SIZES = [x*0.05 for x in range(0,int(25/0.05))]
>
> db.define_table('product',
>     Field('series', 'reference series'),
>     Field('material', 'reference material'),
>     Field('finish', 'reference finish'),
>     Field('size1'),
>     Field('size2'))
> db.product.size1.requires=IS_EMPTY_OR(IS_IN_SET(SIZES))
> db.product.size2.requires=IS_EMPTY_OR(IS_IN_SET(SIZES))
>
> **EDITED**
> Actually, it only saves floats..but not whole numbers
>
>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to