diff --git a/exceptions/updates/MDInsufficientPassword.php b/exceptions/updates/MDInsufficientPassword.php new file mode 100644 index 0000000..e49f3fb --- /dev/null +++ b/exceptions/updates/MDInsufficientPassword.php @@ -0,0 +1,27 @@ + + */ +declare(strict_types = 1); + +/** + * This file contains an exception class to be thrown if users try to set + * insufficient / too weak passwords. + */ +final class MDInsufficientPassword extends MDgenericInvalidInputsException { + /** + * Error message. + * + * @return string + */ + public function errorMessage() { + //error message + return 'Insufficient / weak password: ' . $this->getMessage(); + + } +} diff --git a/exceptions/updates/MDUserPasswordsDoNotMatch.php b/exceptions/updates/MDUserPasswordsDoNotMatch.php new file mode 100644 index 0000000..0c496ab --- /dev/null +++ b/exceptions/updates/MDUserPasswordsDoNotMatch.php @@ -0,0 +1,27 @@ + + */ +declare(strict_types = 1); + +/** + * Custom exception class to be raised if users' password and password + * verification don't match. + */ +final class MDUserPasswordsDoNotMatch extends MDgenericInvalidInputsException { + /** + * Error message. + * + * @return string + */ + public function errorMessage() { + //error message + return 'Passwords don\'t match: ' . $this->getMessage(); + + } +}