Hi In my database i have a number field i have somethig like this
db.define_table("Inventory", Field("idProduct", db.Product, label="Product"), Field("quantity", "integer", default=None, label="Quantity")) db.Inventory.idProduct.requires=IS_IN_DB( db, 'Product.id', ' % (nProduct)s ') If i want to leave the field quantity empty, it shows me that i must put a numer between some range. Is there a way to put this field empy? Other validation i have problem is inserting states db.define_table("State", Field("idCountry", db.Country, label="Country"), Field("nState", "string", default=None, label="State", notnull=True, ondelete='CASCADE')) I cant put is_not_in_db() in nState, because I have a state named Alberta in canada, but maybe is there a state Alberta in other country if i put this, i cant insert the state alberta in both countries. But if i dont do this i can insert Alberta in Canada a lot of times. so, is there a way to validate both fields in the model? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---