I have two radio buttons (yes/no) in React.js
with Formik
and Yup
packages used in my projects.
I want to provide a validation message using schema when the user selects the NO option out of the two.
I am able to provide the required validator with Yup
though.
Can anyone help me with this?
I tried following one and it worked,
Also, this is straight validation, was not used in any form.
To use this in form, you could reuse the schema but not use
validate
as part of the schema.for example, your schema can be,