How to validate indivivual accordion?

How to validate indivivual accordion?

I have accordion that works similarly like this:

http://jqueryui.com/accordion/

The only difference is we are have textboxes for users to enter data and dropdowns to select data from.

Once a user completes the process on each accordion, the user clicks the next accordion and continues the process.

The issue we have now is we have not figured out a way to validate form fields on each accordion in such that a user cannot go to another accordion until all textboxes are filled and selections made from each dropdown.

Is there a way to ensure user does not go to another accordion until all form fields are filled in current accordion?

I have done a lot of browsing but can't find anything.

Thanks in advance for your help.