Electrical cables must be secured to framing from one electrical box to the other. Electrical cables are required by the National Electrica Code. Cables should be fastened to framing at least every 54 inches. There are many options available for fastening cables. There are staples, nail staple and clips that will hold cables in place. Cables should also be fastened within 12 inches of a box.
There are a few details to keep in mind when attaching cables.
While routing electrical cables, make gradual bends. Avoid sharp bends in the cable immediately after leaving a box, exiting or entering a drilled hole, or after a staple or clip. Cable clips and staples should be snug and secure but not clamped too tightly so that the cable is damaged or indented from overtightening.
For single cables, staples are adaquate to hold cables in place, but for larger quantities of cabling, cable clips should be used for a neat appearance and secure connection. These multi-cable clips either nail on or can be screwed on the framing. Then, simply slide the cables into the clip slots to secure them.
It has been my experience over the years to leave some slack on the wiring that enters sitch, outlet, and ceiling fixture boxes. Thi includes any areas that drywall will be placed on the walls after the initial rough-in of the electrical wiring. The reason being that when drywall is installed, sometimes the drywallers use a router to cut out the box openings. On more than one occasion, the wire sheathing has been damaged by the router tip. By having slack in the cable, you can easily loosen the box clamp and pull the slack wire into the box, discarding the damaged portion.