Answers for "how to check positive values with yup"

0

how to check positive values with yup

number: Yup.number()
  .required('ERROR: The number is required!')
  .test(
    'Is positive?', 
    'ERROR: The number must be greater than 0!', 
    (value) => value > 0
  )
Posted by: Guest on April-19-2022

Code answers related to "how to check positive values with yup"

Browse Popular Code Answers by Language