79636538

Date: 2025-05-24 07:51:56
Score: 1
Natty:
Report link

In this version(mine is 1.6.1) of yup, you should use arrow functions for then and otherwise.

For Example:

then: () => yup.number().min(0).max(100).required(),
otherwise: () => yup.number().nullable().transform(emptyToNullTransform),

I just added ()=> to the code

the source that explained it: This page

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: David