How are past transactions validated (when there have been softforks)?
Four methods have been used to decide whether a softfork should apply:


The softfork applies to all blocks, past and future.
Example: The softfork to remove the integer overflow bug.
The softfork applies to all blocks with a timestamp after a flag day.
Example: The initial form of BIP30 was applied to all blocks with a timestamp later than 1331769600. (March 15, 2012, 00:00 UTC)
The softfork applies to all blocks except some grandfathered-in blocks.
Example: The current form of BIP30 is applied to all blocks, except two that violate it.
The softfork applies to all blocks created after a successful miner vote. A Bitcoin client can determine if a softfork applies purely by looking at the blockchain.
Example: BIP34, which required block height to be placed in the coinbase in all new blocks.