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 c34cc98 commit 4aea431
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -591,8 +591,9 @@ <h2>List of valid Words</h2>
function join()
{
username = document.getElementById("username").value;
var usernameVar = username;
console.log("This is the username length");
console.log(username.length());
console.log(usernameVar.length());
if (username.trim() !== "")
{

Expand Down Expand Up @@ -639,7 +640,7 @@ <h2>List of valid Words</h2>


}
else if(username.length() > 10)
else if(usernameVar.length() > 10)
{
alert("Username is too long. Names have to be 10 or less characters");
sent_status = 0;
Expand Down

0 comments on commit 4aea431

Please sign in to comment.