Add validation for entry. Fix bug in form.