Validations on a child section on button click on the wrapper

Certified Senior Developer

Our team has been having a difficult time figuring this out. I'll try and do my best explain clearly.

We have a child interface where you add a creditor and a debtor. The field level validations are working fine in the form itself. The validations I'm referring to here are, there is a debtor section where the debtors are added to an array rule input. Same with creditors. This interface is called in the main wrapper interface where the "Next", "Back", etc buttons are located. The requirement is to be, **only when a user clicks "Next"** is it supposed to check for page level validations. Meaning once a user clicks "Next" it'll check to see if there is both a creditor and debtor added. If it finds that there is no debtor added, for example, an error message will display to the user saying "You must have at least one debtor and one creditor added to proceed," and the page count will not progress. 

We're having trouble figuring out how to connect the section validations in the child interface to the "Next" button in the parent interface. 

We've also messed around with a custom validation message displaying thru richText. 

I hope this makes sense. Any suggestions would be appreciated. Thanks!

  Discussion posts and replies are publicly visible