I can only speak to my own experience. My wife and I had known each other for about 6 years before we got married. We dated for a couple of years, then moved in together. We are still married 20+ years later. A large group of our friends have similar stories. They dated for a while, then lived together, then got married after several years. Of the friends we have who got married after just a few months of dating, 6 are divorced and one of those has been divorced twice already. And a couple of them are still married. I'm not trying to use this as a platform to say that what we did is the only way to go or that it's always the best way to go in every situation -- it's not intended to be a rule, just that this represents something that has worked in the real world.
In my opinion, there is only one rule about how long you should wait: Married life should not be a surprise. By the time you get married, your partner should be your best friend, and you should know your partner's career goals, financial habits, views on having children, home ownership, sports preferences, food preferences, sexual and affection demands, willingness to travel, allergies, fashion sense (if any), music likes, sense of humor, and their argument style among many other strengths and weaknesses of character. And you have to be able to see yourself with this person in light of all of those things, either because of or despite them.