Server side validation and client side error reporting

Closes #118