Registration codes for Plants vs. Zombies are single-use. Once a code has been entered by one person, it is spent — so a string of digits copied from a forum post will almost certainly be rejected.
This is deliberate. Publishers have spent years tightening activation systems so that a key cannot be reused, reshared, or guessed. Modern storefronts tie the licence to an account instead of a typed code for exactly this reason.
If you are stuck at the registration screen, the reliable fix is to buy the game from an authorised store or a legitimate digital shop. It is inexpensive, it will not lock you out halfway through, and you get updates and support with it.