Skip to content

Commit

Permalink
fixed name length defect
Browse files Browse the repository at this point in the history
  • Loading branch information
vincenttrinh3336 committed May 1, 2024
1 parent f26e206 commit 93cc93b
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -594,11 +594,7 @@ <h2>List of valid Words</h2>
var usernameVar = username;
console.log("This is the username length");
console.log(username.length);
if(username.length > 10)
{
alert("Username is too long. Names have to be 10 or less characters");
sent_status = 0;
}

if (username.trim() !== "")
{

Expand All @@ -611,6 +607,11 @@ <h2>List of valid Words</h2>

connection.send(JSON.stringify(U));
}
else if(username.length > 10)
{
alert("Username is too long. Names have to be 10 or less characters");
sent_status = 0;
}
else if (sent_status === 1)
{

Expand Down

0 comments on commit 93cc93b

Please sign in to comment.