validate onSubmit