Given I have a not required field, which I wanna validate only if it's set, how do I do that?
field: {
yup.string().notRequired().test('key', 'message', fn)
}
fails, nevertheless it has notRequired() - when field is not set if my tester fn doesn't return true for undefined. Can I omit tuning the function to handle that case and just make it not called for not required fields if they're not set?
test functions are all independent from each other, if you want to ignore unset values in it you should return true for undefined values