Oh cool thanks... Haven't think about that. Thanks
On Mar 7, 5:40 am, Bernd Rothert <roth...@googlemail.com> wrote: > Hi Yannick, > > On 6 Mrz., 20:07, Yannick <ytchatch...@gmail.com> wrote: > > > Hello mate, > > > A value is saved in the DB as lower case and we put this validation > > "IS_NOT_IN_DB()". If for that field the user enter a Capital letter of > > the same value saved the application will validate the entry. > > > This is not really good. Is there a way to avoid this in Web2py > > without a need to build a customize validation method ? > > not exactly - but you can chain validators and use something as simple > as: > > db.person.name.requires= [ > lambda s: (s and s.lower(), None), > IS_NOT_IN_DB(db, db.person.name), > ] > > > Please let me know if you have an idea. > > > Cheers, > > Cheers > Bernd