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

426
Views
Sí, la validación de una matriz de una matriz de objetos ahora funciona.

Tengo esta construcción extraña en la que tengo una matriz de muchas matrices con un solo objeto de cierta forma dentro, y no puedo validarla, permite la primera matriz vacía sin importar qué, por favor, eche un vistazo a esta construcción y dime que estoy haciendo mal

 yup.array().of( yup .array() .length(1) .of( yup.object().shape({ from: yup.string(), to: yup.string(), duration: yup.object().shape({ h: yup.number().nullable(), m: yup.number().nullable() }), dates: yup.array().of(yup.string()), weekDaysWithTime: yup.array().of( yup.object().shape({ day: yup.string(), time: yup.object().shape({ h: yup.number().nullable(), m: yup.number().nullable() }) }) ) }) ) )

la forma que necesito validar es básicamente

 [ [{}],[{}],[{}] ]

y permite que solo se valide una matriz vacía externa [].

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!