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

177
Views
how do I replace number a dot (.) with a comma (,) using react-hook-form

I am developing a German app and they do not use dots (20.00) in numbers, they use commas (20,00). Using react-hook-form, how do I replace the dot without converting my numbers to strings?

NumberInput is imported

<NumberInput
   id={item.field}
   errorMessage={t(
       get(errors, `${item.group}.${item.field}`)?.message
   )}
   decimalPlaces={item.decimalPlaces}
   controllerProps={{
   name: `${item.group}.${item.field}`,
   control: control,
      rules: {
      ...item.rules,
      validate: {
         oneRequired: (v) =>
             validateOneRequired(v, item?.validateAgainst)
      }
    }
  }}
inputcss={`w-formTextInput ${
errors?.[item.group]?.[item.field] && 'border-red-600'
}`}
enableTooltip={item.enableTooltip}
tooltip={item.tooltip}
key={index}
label={item.placeHolder}
placeholder={item.placeHolder}
/>

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!