[web2py] Re: upload widgets problem with nullable compound validators

2011-01-17 Thread kenji4569
Thanks for your support! Maybe the adopted one is much consistent. On 1月18日, 午前1:21, Massimo Di Pierro wrote: > "IS_NULL_OR([IS_XXX(..), IS_YYY(..), ..])" > > in trunk now. Good suggestion although I think an internal refactoring > is in order. > > On Jan 16, 10:57 pm, kenji4569 wrote: > > > > >

[web2py] Re: upload widgets problem with nullable compound validators

2011-01-17 Thread Massimo Di Pierro
"IS_NULL_OR([IS_XXX(..), IS_YYY(..), ..])" in trunk now. Good suggestion although I think an internal refactoring is in order. On Jan 16, 10:57 pm, kenji4569 wrote: > I ended up with making a custom validator "IS_ALL" for the problem: > > "IS_NULL_OR(IS_ALL([IS_XXX(..), IS_YYY(..), ..])" > > and

[web2py] Re: upload widgets problem with nullable compound validators

2011-01-16 Thread kenji4569
I ended up with making a custom validator "IS_ALL" for the problem: "IS_NULL_OR(IS_ALL([IS_XXX(..), IS_YYY(..), ..])" and it works. The alternatives could be to permit the follwoing interfaces, which need patches though: "IS_NULL_OR([IS_XXX(..), IS_YYY(..), ..])" or "[IS_NULL_OR(IS_XXX(..)),

[web2py] Re: upload widgets problem with nullable compound validators

2011-01-12 Thread Massimo Di Pierro
good catch. Let me think about this... On Jan 12, 1:12 am, kenji4569 wrote: > I applied the follwing validators for upload fields in version 1.91.6: > > requires = [ >     IS_NULL_OR(IS_UPLOAD_FILENAME(extension='pdf')), >     IS_NULL_OR(IS_LENGTH(1048576, 1024)), > ] > > Everything was fine unti