Good day, I have a form that I want to validate and in the form there's a field that is hidden and it displays when a specific value (e.g Nigeria is selected show states fields) in a dropdown is selected. I want to validate the field that displays together with the rest of the fields.
If I select country on the validate form fields and state, and the country I selected is different from Nigeria, my state validator will still be active even though it's no longer been displayed on the UI and I won't be able to move passed the page on submit because state wasn't selected.
Do I need to write a custom function for a separate form validator to take the issue into consideration. If yes, Please how can I go about that. If No, What can I do to solve this issue.