The function of the valves in the peripheral veins is to ensure that the overall movement of blood in the veins is in the right direction, toward the heart. This is especially important in the legs, where the blood must flow a relatively long distance against gravity.