Hi, I'm working on a web2py project, and I'm slowly learning. Thanks for all the ressources available. I needed a new DAL validator like IS_UPPER() but based on title(), so I looked over the source files and saw validators.py. I added the class IS_TITLE() to it but it doesn't seems to be enough to make it work on my model. Candid developer... What should I do ? I'd like to contribute to the validators.py file, so here's a new class to add if web2py's team agree :
class IS_TITLE(Validator): """ Converts to title :: >>> IS_TITLE()('abc-def ghi') ('Abc-Def Ghi', None) >>> IS_TITLE()('é') ('\xc3\xa9', None) """ def __call__(self, value): return (value.decode('utf8').title().encode('utf8'), None) -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.