I am trying to validate a string that if empty should not be validated but if there is a character then validation should start. I tried this but to no avail
iban: yup
.string()
.notRequired()
.min(5, 'Minimum of 5')
.max(34, 'Maximum of 34'),
If empty string as in '' it still throws a minimum of 5 error How can I fix this?