On Wednesday, January 15, 2014 1:47:26 PM UTC-5, Kiran Subbaraman wrote: > > I was just using some of the validators, like IS_EMAIL(), IS_NOT_EMPTY(), > and noticed that the error messages that it returns do not have the first > character capitalized. > Basically I see error messages like '*e*nter a valid email address'; I > expected to see something like this '*E*nter a valid email address' <-- > notice the capitalization of the first character. Ref: > https://github.com/web2py/web2py/blob/200a95384942c2259b4d26de015a2221a867c978/gluon/validators.py#L1108 > > I know that I can redefine the error message the way I need it, but then > felt unnecessarily nitpicky about the default message structure. > Would it be ok if I were to convert the error messages in validators.py, > with the first character capitalized, and submit a pull request? If so, > I'll link it to an issue/task. >
I would be in favor if this change. > Also, is there a reason why the default messages are not translated, like > this error_message=T('Enter a valid email address')? > In the __call__ method, the returned value includes translate(self.error_message), so the messages do get translated. Anthony > -- 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/groups/opt_out.