IS_DATE_IN_RANGE and IS_DATETIME_IN_RANGE have bugs. Someone changed my initial patch, that's not a problem, but 4 lines misses the s - string specifier at the end of the strings.
error_message = "enter date on or before %(max)s" error_message = "enter date on or after %(min)s" error_message = "enter date and time on or before %(max)s" error_message = "enter date and time on or after %(min)s" On Jan 18, 2:06 am, Jeff Bauer <[email protected]> wrote: > On 01/17/2010 03:27 PM, mdipierro wrote: > > > I have rewritten some of the code that deals with dropdowns, in trunk. > > In particular now you can do > > > IS_IN_SET(...,sorted=True) > > IS_IN_DB(...,sorted=True) > > IS_EMPTY_OR(IS_IN_SET(...,sorted=True)) > > IS_EMPTY_OR(IS_IN_DB(...,sorted=True)) > > > If your app uses a lot of dropdowns please check nothing is broken by > > this change and let us know. > > IS_IN_SET works, except problems reported earlier > with SQLFORM.widgets.checkboxes.widget. (I haven't > gotten around to looking into it like I said I would.) > > IS_IN_DB works, except I can't still use it to enforce > a one-to-one relation: > > db.diag.soc.requires = IS_IN_DB(db, 'soc.id', > _and=IS_NOT_IN_DB(db, 'diag.soc')) > > > we also have > > >IS_DATE_IN_RANGE(minimum,maximum,error_message) > > IS_DATETIME_IN_RANGE(minimum,maximum,error_message) > > > please check them out. > > I have a use forIS_DATE_IN_RANGEand will try it out > tomorrow. > > Jeff Bauer > Rubicon, Inc. -- You received this message because you are subscribed to the Google Groups "web2py-users" 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.

