Description
I have not figured out how to achieve the following:
either fieldA or fieldB needs to be filled to be valid.
if I put a requirement on fieldA and user tabs to it first, the page will show invalid notice before the user gets to fieldB -- unacceptable for client
The validation occurs onblur, before we know where the user is going. If the user clicks in fieldA, leave it blank, and goes to another field besides fieldB, an invalid notice should show to be consistent.
I tried removing the invalid notice for fieldA upon arriving at fieldB, but the error pops up briefly -- unacceptable for client
My thinking now is to do a force validate onfocusout from the enclosing div. I understand how to trigger a submit, but that lists all the errors and brings you to the top of the form.
I just want to force validate fieldA in conjunction with fieldB upon leaving the enclosing div, showing an invalid notice if neither is filled. Is this possible?
Note: if user has info for both fieldA and fieldB, client wants both captured