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

258
Vistas
How can I get Yup form validator to recognize the react-select defaultValue and submit the form?

I am attempting to render defaultValues in a react-select component.

var initValue = ['Chocolate', 'Strawberry', 'Vanilla];

The react-select components display with the correct default value. However, my Yup validation doesn't recognize the default value (see image below) as a valid selection.

enter image description here

Therefore the form will not submit, although the fields are filled in. Can someone advise how I can make my Yup validator recognize the defaultValue? Please see working code version in my github repo, which demonstrates this issue.

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

You should use value instead of defaultValue.

about 4 years ago · Juan Pablo Isaza Denunciar
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