Added form validation for updating/adding teaching materials.

closes #205