Skip to content

Commit

Permalink
Fixed signup form not accepting names with spaces.
Browse files Browse the repository at this point in the history
  • Loading branch information
shrihari-prakash committed May 1, 2024
1 parent b9239ad commit be2eff7
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/public/components/signup.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ export default function SignUp() {

function signup(event) {
event.preventDefault();
const username = document.getElementById("username").value;
const firstName = document.getElementById("firstName").value;
const lastName = document.getElementById("lastName").value;
const email = document.getElementById("email").value;
const username = document.getElementById("username").value.trim();
const firstName = document.getElementById("firstName").value.trim();
const lastName = document.getElementById("lastName").value.trim();
const email = document.getElementById("email").value.trim();
const password = document.getElementById("password").value;
const submit = document.getElementById("submit");
const user = {
Expand Down Expand Up @@ -188,7 +188,7 @@ export default function SignUp() {
aria-label="Last Name"
aria-required="true"
placeholder={getPlaceholder(i18next.t("field.placeholder.last-name"), configuration)}
minLength="3"
minLength="1"
autoCorrect="off"
autoCapitalize="on"
spellCheck="false"
Expand Down

0 comments on commit be2eff7

Please sign in to comment.