Merge pull request #5 from matrix-org/babolivier/template-lower

Print a (prettier) error if the chosen username contains uppercase characters
master
Brendan Abolivier 5 years ago committed by GitHub
commit 9c9a3a133a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -36,13 +36,13 @@ let onResponse = function(response, success) {
};
// 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) {
return !allowedUsernameCharacters.test(username);
}
let allowedCharactersString = "" +
"<code>a-z</code>, " +
"<code>0-9</code>, " +
"lowercase letters, " +
"digits, " +
"<code>.</code>, " +
"<code>_</code>, " +
"<code>-</code>, " +

Loading…
Cancel
Save