run validation on submit