File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 1- #include < string >
1+ #include " validation.hpp "
22#include < algorithm>
33#include < cctype>
4- #include " validation.hpp "
4+ #include < string >
55
66std::string getErrorMessage (const ErrorCode errorCode) {
77 std::string errorMessage{};
8- switch (errorCode) {
8+ switch (errorCode) {
99 case ErrorCode::Ok:
1010 errorMessage = " Ok" ;
1111 break ;
@@ -40,13 +40,13 @@ ErrorCode checkPasswordRules(const std::string& password) {
4040 if (password.size () < 9 ) {
4141 errorCode = ErrorCode::PasswordNeedsAtLeastNineCharacters;
4242 }
43- if (std::none_of (password.cbegin (), password.cend (), [](const char c){ return std::isdigit (c);})) {
43+ if (std::none_of (password.cbegin (), password.cend (), [](const char c) { return std::isdigit (c); })) {
4444 errorCode = ErrorCode::PasswordNeedsAtLeastOneNumber;
4545 }
46- if (std::none_of (password.cbegin (), password.cend (), [](const char c){ return std::ispunct (c);})) {
46+ if (std::none_of (password.cbegin (), password.cend (), [](const char c) { return std::ispunct (c); })) {
4747 errorCode = ErrorCode::PasswordNeedsAtLeastOneSpecialCharacter;
4848 }
49- if (std::none_of (password.cbegin (), password.cend (), [](const char c){ return std::isupper (c);})) {
49+ if (std::none_of (password.cbegin (), password.cend (), [](const char c) { return std::isupper (c); })) {
5050 errorCode = ErrorCode::PasswordNeedsAtLeastOneUppercaseLetter;
5151 }
5252 return errorCode;
You can’t perform that action at this time.
0 commit comments