So I have this field:
<input type="number" {...register('price')}>
And then the resolver:
{
price: yup
.number()
.typeError('Must be numeric.')
.min(1, 'Minimum $1')
.max(999999, 'Maximum $999.999')
.optional()
.nullable()
}
But it still shows:
price: must be a `number` type, but the final value was: `NaN` (cast from the value `""`).
When submitting the form...