score:0

price: yup
  .number()
  .typeError('Must be numeric.')
  .integer('Error message')
  .min(1, 'Minimum $1')
  .max(999999, 'Maximum $999.999')
  .transform((value) => (isNaN(value) ? undefined : value))
  .nullable()
  .optional()

Related Query

More Query from same tag