In many societies in which a specialized warrior class exists, specific codes of conduct (ethical codes) are instituted in order to ensure that the warrior class is not corrupted or otherwise dangerous to the rest of society. Warrior codes often have common features and usually value honour in the forms of faith, loyalty and courage. Examples include the Nine Noble Virtues of Germanic folklore, medieval knights’ code of chivalry, the Kshatriya code of Dharma in India, the system of values of ancient Armenian army or Japan’s samurai class which uses a warrior code known as Bushido (The Way Of The Warrior) and xiá in China. See also noblesse oblige.
Warriors’ honor is dependent on following the code. Common virtues in warrior code are mercy, courage and loyalty.