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

314
Views
Sí, validación para dos campos, cuando un campo cambia, hace que otro campo sea nulo

allí estoy tratando de hacer este tipo de función, donde si el primer campo cambia de valor, el segundo campo debería ser nulo

tengo esto

 start: Yup.date() .max(new Date(), 'startDateCannotBeHigher') .required('pleaseWriteStartDate'), end: Yup.date().when(start, { is: (start) => start, then: Yup.date() .when( 'start', (start, schema) => start && schema.min( new Date(new Date(start).setFullYear(new Date(start).getFullYear() + 1)), 'endDateCannotBeSameAsStartDate' ) ) .required('pleaseWriteEndDate'), }),

Entonces, cuando se cambia el campo de inicio, quiero que el final sea nulo.

Muchas gracias

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!