added front-end validation for form, closes #16