[web2py] Re: Changing password error message

2017-09-08 Thread Anthony
Got it. You can do something like this: def user(): form = auth() if form.errors.old_password: form.errors.old_password = 'Please enter the old password' return dict(form=form) We should probably fix this by having a setting like auth.messages.missing_old_password. Please ope

[web2py] Re: Changing password error message

2017-09-08 Thread Simona Chovancová
Because if user submits my change_password form and leaves everything empty, I do not want 'Too short' to be error message for the old password field but rather something different.. and that did not change the error_message on it On Wednesday, September 6, 2017 at 5:27:33 PM UTC+2, Anthony wro

[web2py] Re: Changing password error message

2017-09-06 Thread Anthony
Why do you want to validate the old password? The only requirement should be that it actually matches the old password, and therefore the only error message you would want to report is that the password doesn't match (which can be customized via auth.messages.invalid_password). Anthony On Wedn