Remove uppercase from allowed chars and prettify the error message

master
Brendan Abolivier 5 years ago
parent de8a1aa5da
commit 5764c5361c
No known key found for this signature in database
GPG Key ID: 1E015C145F1916CD

@ -36,13 +36,13 @@ let onResponse = function(response, success) {
}; };
// We allow upper case characters here, but then lowercase before sending to the server // We allow upper case characters here, but then lowercase before sending to the server
let allowedUsernameCharacters = RegExp("[^a-zA-Z0-9\\.\\_\\=\\-\\/]"); let allowedUsernameCharacters = RegExp("[^a-z0-9\\.\\_\\=\\-\\/]");
let usernameIsValid = function(username) { let usernameIsValid = function(username) {
return !allowedUsernameCharacters.test(username); return !allowedUsernameCharacters.test(username);
} }
let allowedCharactersString = "" + let allowedCharactersString = "" +
"<code>a-z</code>, " + "lowercase letters, " +
"<code>0-9</code>, " + "digits, " +
"<code>.</code>, " + "<code>.</code>, " +
"<code>_</code>, " + "<code>_</code>, " +
"<code>-</code>, " + "<code>-</code>, " +

Loading…
Cancel
Save