Fix validation for the add requirement panel.

Refactors so that validation is moved into a single method and
that clicking the Add Requirement to Session or Save Changes
buttons correctly validate.