handle invalid title in onSubmit just in case