Form validation for apps. Fixes #1.