Merge pull request #1089 from thecodingmachine/fixLoginError

FIX: better error text in LoginScene
This commit is contained in:
Kharhamel 2021-05-28 17:51:55 +02:00 committed by GitHub
commit bc67817d64
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -41,7 +41,7 @@ export class LoginScene extends ResizableScene {
} }
pErrorElement.innerHTML = ''; pErrorElement.innerHTML = '';
if(inputElement.value && !isUserNameValid(inputElement.value)){ if(inputElement.value && !isUserNameValid(inputElement.value)){
pErrorElement.innerHTML = 'Invalid user name: only letters and numbers are allowed. No spaces.'; pErrorElement.innerHTML = 'Invalid user name: No spaces are allowed.';
} }
if (event.key === 'Enter') { if (event.key === 'Enter') {
event.preventDefault(); event.preventDefault();