Basic input validation on submit.