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

138
Views
How to implement mask for cpf and zipcode fields?

Good afternoon! I'm developing a registration form for studies in React and I wanted to use the mask library for the cpf and zip code fields using the react-input-mask lib with the Material UI lib. But I'm having difficulty when implementing the mask. Below is my code.

      <TextField 
        onChange={(event) => setCPF(event.target.value)}
        value={cpf}
        error={!error.cpf.validate}
        helperText={error.cpf.text}
        onBlur={validateFields}
        placeholder='11122233310'
        id='cpf'
        label='CPF'
        name='cpf'
        type='number'
        variant='outlined'
        fullWidth
        margin='normal'
        required
      />

      <TextField 
        value={zipcode}
        onChange={(event) => setZipCode(event.target.value)}
        onBlur={validateFields}
        error={!error.zipcode.validate}
        helperText={error.zipcode.text}
        placeholder='00000-000'
        id='zipcode'
        label='zipcode'
        type='number'
        name='zipcode'
        variant='outlined'
        margin='normal'
        required
      />

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!