Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

136
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda