Probably because it is not listed in the __all__=[....] at the top of the file and therefore it is not imported in the scope.
Anyway, you should put your custom validator in a model file or in a module file (and import the latter). It is not a good to edit the system files (validators.py) unless you plan to submit for inclusion in web2py. On 1 Lug, 16:09, Jacques van der Merwe <[email protected]> wrote: > greetings all, > > i've just written a custom validator which has been placed into gluon/ > validators.py. the strange thing is that i'm getting an undefined > error when trying to call it from db.py. i can call any of the other > validators defined in validators.py and so i'm a little boggled as to > why this is happening. > > the new validator works and follows the structure of the others, in > case anyone is going to ask me that. :) > > anyone have any ideas? > > cheers!

