Dylaan at hammerpedia explains not only the buidling code for plumbing in the USA, but also the reason why it should be followed.
Trap arm length
Categories: Construction Building code
The trap arm is the pipe between the trap and the vent. Its length cannot be less then twice the diameter.