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

251
Views
Necesita hacer referencia/acceder al valor Yup.ref() dentro del mensaje de validaciones min y max yup

Tengo la siguiente validación Yup y no estoy seguro de cómo hacer referencia al valor Yup.ref(a) dentro del mensaje de ese .min() y .max() , es decir:

 checkPercent: Yup.number() .when("summaryFlag", { is: true, then: Yup.number() .typeError('Value must be a number') .required('Value is required') .positive() .min(Yup.ref("percentLower"), `{The value must be > xx`) .max(Yup.ref("percentUpper"), `{The value must be < yy`) })

Usando lo anterior, ¿cómo puedo reemplazar xx en mi mensaje .min con el valor real de Yup.ref("percentLower") ?

Lo mismo para que yy se reemplace con el valor de Yup.ref("percentUpper") ?

Intenté usar la sintaxis de literales de plantilla pero no funcionó, es decir:

.min(Yup.ref("percentLower"), {The value must be > ${Yup.ref("percentLower")})

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!