Skip to content
Snippets Groups Projects
Verified Commit 1d697149 authored by Timm Fitschen's avatar Timm Fitschen
Browse files

MAINT: nicer error messages for user name/password invalid

parent d7fa78c0
No related branches found
No related tags found
2 merge requests!66REL: prepare release 0.8.0,!63Make password and user name requirements configurable
Pipeline #24948 failed
......@@ -209,7 +209,7 @@ USER_NAME_VALID_REGEX=^[\\w\\.][\\w\\.-]*{1,32}$
USER_NAME_INVALID_MESSAGE=User names must have a length from 1 to 32 characters. They must contain only latin letters a-z (upper case or lower case), number 0-9, dots (.), underscores (_), or hyphens (-). They must no start with a hyphen.
PASSWORD_VALID_REGEX=^((?=.*\\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[\\p{Punct}]).{8,128})$
PASSWORD_INVALID_MESSAGE=blablabla
PASSWORD_INVALID_MESSAGE=Passwords must have a length from 8 to 128 characters. THe must contain at least one [A-Z], one [a-z], one [0-9] and a special character e.g. [!§$%&/()=?.;,:#+*+~].
# --------------------------------------------------
# Extensions
......
......@@ -403,7 +403,7 @@ public class ServerMessages {
return new Message(
MessageType.Error,
MessageCode.MESSAGE_CODE_UNKNOWN,
"This password does not match the current policies for passwords: " + policy);
"The password does not comply with the current policies for passwords: " + policy);
}
public static final Message AFFILIATION_ERROR =
......@@ -610,7 +610,7 @@ public class ServerMessages {
return new Message(
MessageType.Error,
MessageCode.MESSAGE_CODE_UNKNOWN,
"The user name does not comply with the policies for user names: " + policy);
"The user name does not comply with the current policies for user names: " + policy);
}
public static final Message CANNOT_DELETE_YOURSELF() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment