Hello I am quite new to YUP and trying to like it :)
I am able to get yup to do the basic (built-in) validation stuff, but I can't seem to figure out how to do validation that involves a bit of math.
For instance, I'm aware that you can use Yup.ref('field') and .lessThan to validate field_1 against field_2, but what if you wanted to do something like this?
if ((field_1 * field_2} < field_3) { return an error }
I am aware by reading the documentation that you can add custom methods (ie: addMethod) to yup, but I have failed to make this approach work so far.
Any help or a link to a solid example of how to use addMethod in this manner would be greatly appreciated. Thanks in advance.