yup validation messages code example
Example 1: yup number validation custom message
numberFiled: Yup.number()
.typeError('you must specify a number')
.min(0, 'Min value 0.')
.max(30, 'Max value 30.')
Example 2: yup min validation with error message
// min and max
Yup.object().shape({
temperature: Yup.number()
.min(0, 'Min value 0.')
.max(30, 'Max value 30.'),
})