Talking about the paladin's code brings to mind the cavalier's code as well. How should the cavalier's code work? Should it be the same as the paladin's code, or work the same way?
First, let me emphasize that I do not like the cavalier class as written in Unearthed Arcana, and not just because I'm an OD&D fan rather than an AD&D fan. It's just a really annoying, over-privileged class. But I did do a rewrite of the cavalier to strip them of all their fancy powers and make them into snobby, elite horsemen.
I still mention a code. It's not the same kind of code as a paladin, though. Think of the difference between a paladin and a cavalier as Righteousness vs. Honor. Morality vs. Propriety. The paladin's code is focused on self sacrifice, but the cavalier's honor is self-centered, even if it is not always out-and-out selfish.
A paladin's actions, in times of crisis, must prioritize innocents above comrades, comrades above opposing enemies, opposing enemies above self-preservation. For a cavalier, it's not just actions in combat that matter, it's behavior in general, and all behavior must prioritize high social status over low social status.