Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

194
Views
The input restrictions I set up are not working

I am working in next.js in a jsx file for context. My input field restrictions are not working and are not restricting the submit button from submitting. How can I fix this?

if (!Boolean(userToken))
  return (
    <>
      <div>
        <p className="">address: {address}</p>
      </div>
      <div
        id="form"
        className="absolute p-10 transform -translate-x-1/2 -translate-y-1/2 border-2 rounded-md shadow-lg top-1/3 left-1/2 "
      >
        <h2 className="flex p-5 text-2xl font-semibold"> Link Username </h2>
        <form id="" className="">
          <input
            id="username"
            className="m-5 border-2 rounded outline-0 focus:bg-slate-100 hover:bg-slate-50"
            type="text"
            value={userName}
            onChange={(event) => setUsername(event.target.value)}
            required
            minLength="3"
            maxLength="30"
            pattern="[a-zA-Z0-9_]+"
            title="only letters, numbers, and underscores."
          />
          <button
            className="p-1 rounded hover:bg-slate-100 actve:bg-slate-200"
            type="submit"
            onClick={(e) => writeUserData(address, userName)}
          >
            Link Name
          </button>
        </form>
      </div>
    </>
  );
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!