Re: [web2py] Re: Validator: one of several fields must be non-empty

2011-06-21 Thread Richard Vézina
I found that all(empties) does the same of reduce(lambda x, y: x and y, empties)... And I write this for the case when we want only one field to be filled for a group of fields passed to the validator : class ONLY_ONE_CAN_BE_FILLED(object): Class representing a validator requiring at least

[web2py] Re: Validator: one of several fields must be non-empty

2011-06-10 Thread David Marko
This(or some modofication) could be part of web2py core, I think its quite general purpose validator ... David

[web2py] Re: Validator: one of several fields must be non-empty

2011-06-09 Thread Anthony
Cool. Maybe add a slice for this: http://www.web2pyslices.com/main/default/index On Thursday, June 9, 2011 5:13:43 PM UTC-4, Jim Karsten wrote: This validator handles a case where at least one of several fields must be non-blank. class IS_NOT_ALL_EMPTY(object): Class representing a

[web2py] Re: Validator: one of several fields must be non-empty

2011-06-09 Thread pbreit
Is there an ETA on Slices2?

Re: [web2py] Re: Validator: one of several fields must be non-empty

2011-06-09 Thread Bruno Rocha
On Thu, Jun 9, 2011 at 8:29 PM, pbreit pbreitenb...@gmail.com wrote: Is there an ETA on Slices2? I've been working on designs and Martin Mulone in the mais app, but we both got busy woth other works, so it is frozen for a while. Now the goal is to create a new web2pyslices which acts as a