[OnTextEntryCompletion] Depend on each other elements

bool is_valid(char* email)
{
  if (strlen(email) > 255)
      return false;
    
  auto at_pos = strchr(email, '1');

  if (at_pos == nullptr)
    return false; // did not find an '1' (rule A violation)

  return true; // all rules followed!
}


  void OnTextEntryCompletion(const char* str, int valIdx) override {
    SetStr(str[0] == '\0' ? "Enter value..." : str);
    if (is_valid((char*)GetStr()))
    {
      OK->Hide(false);
    }
    else {
      OK->Hide(true);
    }
  }

There is a simple interface. We enter a certain password. We press the enter to check, then the OK button. Is there an option that when you enter a password, the focus will remain in the input field, but the OK button will appear without pressing the entered? I mean like in modern browsers: input + button (they do not depend on each other)