Validating multi-step form

You may be able to do something similar using session variables. I wonder if some combo of a Step session variable and javascript to make specific fields required based on the “Step” session variable would work?