Hi,

While testing some of the exmaples from the latest manual, the
IS_IN_SET() validator confused me:

db.define_table("person",
        SQLField("gender", notnull=True),
        SQLField("desserts", notnull=True))

db.person.gender.requires   = IS_IN_SET(("Male","Female"))
db.person.gender.widget     = SQLFORM.widgets.radio.widget
db.person.desserts.requires = IS_IN_SET(("Profiteroles","Tiramisu"),
multiple=False)
db.person.desserts.widget   = SQLFORM.widgets.checkboxes.widget

The validation is passed even if I choose no gender and no desserts.
Is this a normal behavior?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to