Unfortunately not. The ChangePassword method returns only a simple bool for success / failure.
The best option for a failure is to display a general message to the user indicating all the possible reasons for the failure ... for example.
Failed to change password.
Perhaps this happened because:
- Invalid old password
- The new password did not meet the required complexity.
- New passwords must be 8 characters long and contain at least 2 numeric characters. (or something else)
If you want to provide more specific information, then, as you said, you will need to perform a rule check in your own code and pass the information to the user based on this check.
Eoin campbell
source share