I have tried playing over LAN with my friend but when we try to join a game which one of us starts up it says that the game server couldnt validate the cd key (cant remember the exact message) how do i stop it doing this?

If you are just running a simple LAN no Inet I suggest you do it this way:

Set static IPs on the LAN, in the TCP/IP settigns of the network interface cards:

PC1:
IP: 192.168.0.2
Subnet:255.255.255.0

PC2:
IP: 192.168.0.3
Subnet:255.255.255.0

etc.

and perhaps use the settings from the two articles above: m_bValidActivationID=True on both machines.

If when joining or creating a server in the no Inet LAN then just click check mark and let it try to authenticate and since there is no Inet it will just time out.

Make sure not to set a gateway IP in the LAN or the game will probably 'think' that it is the gateway to Internet access and probably cause problems, if you haven't set up the ini as suggested in the two posts.
A gateway IP is not needed in a simple workgroup based LAN, unless it has to connect to the Inet.