From c437ca22ff2e37838f78253c5320c89f8282f5ba Mon Sep 17 00:00:00 2001 From: Oskar Persson Date: Fri, 9 Nov 2018 15:58:09 +0100 Subject: [PATCH] Translate msg when providing incorrect old password --- rest_auth/serializers.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rest_auth/serializers.py b/rest_auth/serializers.py index 2ea6550..b645231 100644 --- a/rest_auth/serializers.py +++ b/rest_auth/serializers.py @@ -256,7 +256,8 @@ class PasswordChangeSerializer(serializers.Serializer): ) if all(invalid_password_conditions): - raise serializers.ValidationError('Invalid password') + err_msg = _("Your old password was entered incorrectly. Please enter it again.") + raise serializers.ValidationError(err_msg) return value def validate(self, attrs):