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

315
Views
Backspace isn't working in the input field in Vue JS (REGEX)
  <vs-input
                  :value="contract.value"
                  :class="isMobileOnly ? 'w-full' : 'w-1/2'"
                  class="mx-auto"
                  type="number"
                  :id="`value-${index}`"
                  onkeydown="
                  return event.keyCode !== 69 && /^-?\d*\.?\d{0}$/.test(this.value)"
                  :placeholder="contract.value === 0 ? undefined : 'Value'"
                  @change="changeValue(index)"
                />

I want the input field to restrict to only one - sign but I can enter 2 - signs. Also, when I input number after the decimal point, I cannot use the backspace key. Backspace works fine when there's no number after decimal point

Backspace key doesn't work after you enter a number after a point

Backspace key doesn't work

I want to be able to enter only one minus sign not 2, in the start only

I want to be able to enter only one minus sign not 2

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!