Skip to content

Commit c437ca2

Browse files
committed
Translate msg when providing incorrect old password
1 parent 479a40d commit c437ca2

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)