Well, your question is a little confusing. After all, libraries that check for errors are based on dictionaries, and what they may consider an error might not be an error for the user. So, disabling the button is not really a good pattern because you have to consider things like jokes, language, and slang. What I highly recommend now is to use an API for an LLM model like ChatGPT or Gemini to verify if a sentence is grammatically and vocabulary correct since it can understand the whole context of the sentence.
gemini: https://ai.google.dev/
chatgpt: https://platform.openai.com/docs/overview
you can visit https://www.tensorflow.org/js to check tensorflow browser model that you can load in your web app to directly verify the sentence without using an api there are a lot MlM doing that today