added support for more detailed error message when the password does not meet the requirements of the regex specified.