Skip to content

Commit 4cf8132

Browse files
authored
Merge pull request #481 from OskarPersson/old-password-error-msg
Use translated msg when providing incorrect old password
2 parents bd843f9 + c437ca2 commit 4cf8132

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

rest_auth/serializers.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,8 @@ def validate_old_password(self, value):
256256
)
257257

258258
if all(invalid_password_conditions):
259-
raise serializers.ValidationError('Invalid password')
259+
err_msg = _("Your old password was entered incorrectly. Please enter it again.")
260+
raise serializers.ValidationError(err_msg)
260261
return value
261262

262263
def validate(self, attrs):

0 commit comments

Comments
 (0)