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

257
Views
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 answers
Answer question

0

You should use value instead of defaultValue.

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