Thanks, that did the trick! On Thursday, November 29, 2012 12:30:31 AM UTC, Mark Li wrote: > > db.auth_user.email.requires[1].error_message = T("The email you have > entered has already been registered.") > > Try using the index of 1, not 0. > > > On Wednesday, November 28, 2012 4:55:54 PM UTC, Daniele wrote: >> >> I'd also like to change that error message "value already in database or >> empty" as I find it a pointless message. >> But I tried with db.auth_user.email.requires[0].error_message = T("The >> email you have entered has already been registered.") >> and it doesn't seem to change anything. Am I misplacing this? I put it in >> the db.py file after the >> auth.define_tables(username=False, signature=False) >> >> Thanks >> >> On Monday, September 17, 2012 3:21:00 AM UTC+1, Mark Li wrote: >>> >>> Is it possible to change the validator error messages in for auth fields >>> like "value already in database or empty," without having to redefine all >>> the validators for that field? For example, I wanted to change the >>> validator error message for IS_NOT_IN_DB for auth_user.email, and I wrote: >>> >>> db.auth_user.email.requires=IS_NOT_IN_DB(db, auth_user.email,error_message >>> =T("Email already in use")) >>> >>> >>> Would I have to define all the validators for auth_user.email now? Is >>> there a less intrusive way of changing the error message without overriding >>> the default validators for auth? >>> >>
--