yes. better On Feb 8, 11:04 am, Jonathan Lundell <jlund...@pobox.com> wrote: > On Feb 8, 2010, at 8:34 AM, mdipierro wrote: > > > send me a patch! > > I'd suggest otherwise--in particular interpreting None as "no limit" in the > min or max direction. > > Interpreting (4) as (0,4) saves the developer two characters of typing. But > interpreting (4, None) or (None, 4) as no limit extends the functionality of > the validator. > > > > > On Feb 8, 10:24 am, "KONTRA, Gergely" <pihent...@gmail.com> wrote: > >>>> And does it makes sense to make all min and max values optional, so > >>>> you can have: enter an integer, which is larger than 2 (witout upper > >>>> limit)? > >>> Having had the need recently, I would like to see: > >>> IS_INT_IN_RANGE(1) # any integer>0 (up to sys.maxint) > >>> IS_INT_IN_RANGE(max=10) # any integer less than 10 > >>> and similarly for IS_FLOAT_IN_RANGE(). > > >> Following python's range() conventions, IS_INT_IN_RANGE(4) should > >> accept ints between 0 and 3. > >
-- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@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.