There is a form that uses Yup for data validation, for a field there are several conditions, it must be numerical value between 1 and 10, a default value 5, it must show an error message if the input is a number outside of the range and another error message if there is no input.
const schema = yup.object({
myInput: yup.number().default(5).min(1).max(10).required('no input'),
...
});
It shows the default value, 5, but when it is deleted and clicked on submit there is no message saying 'no input'.
Also, where should be added the error message if the input is outside of [1, 10] interval?