The National Electrical Code, which is the basis for all local building codes, has specific regulations for installing electrical wires so that they are protected from damage. 

NM Electrical Cable Proper Uses

NM cable, also known by the trade name Romex, is the most common form of electrical wire used in residential electrical work. NM cable is a bundle of individual conducting wires wrapped in a plastic vinyl outer sheathing. Normally the cables carry 10-, 12-, or 14-gauge conducting wires for individual house circuits. The sheathing on NM cable does offer some protection against incidental physical damage. Sheathing on Romex is made of tough polyvinyl chloride (PVC) thermoplastic. The sheathing on both 14 and 12 AWG wire is 19 mils thick. Still, no matter how strong the NM sheathing, it is not meant for exposed applications. Typical locations include:

Inside wall cavities covered with finished wall surfaces, where the cable will not be accessible. Inside the air voids of masonry block or tile walls but only where dry: the walls cannot be damp or wet.  Between exposed joists or studs, provided the cables are recessed away from the face of the framing members. This is normally done by boring holes in the centers of the framing members and running the cables through the holes. 

NM Wire Improper Exposed Uses

The National Electrical Code forbids the use of NM cable in situations where it is exposed in a manner where physical damage is possible. One example of this is where a do-it-yourself electrician attaches NM cable across the front face of studs or ceiling joists or where it is attached across the face of concrete foundation walls. While it’s allowable for NM cable to run through holes bored in the centers of exposed framing members, it cannot be attached across the front face of studs, since this creates the possibility of snagging or damage to the cables. Similarly, NM attached to the face of concrete walls is susceptible to damage and thus is not allowed.

Wiring for Exposed Locations

One approved way to run wiring across exposed surfaces is to mount an approved rigid conduit across the framing members or wall, then run individual THHN conductor wires inside the conduit. Such wiring is well protected against physical damage.  The citation from the National Electrical Code is as follows:  The most common type of conduit is known as electrical metallic tubing (EMT), but other types of conduit are also used, including flexible metal conduit (FMC), intermediate metal conduit (IMC), which is sturdier and offers more resistance to corrosion, plastic conduit (PVC), most often used underground, and rigid metallic conduit (RMC), the heaviest gauge available. The electrical conduit is designed for use with specific types of individual conductor wires. The most common wires are THHN wires, which are individual copper conducting wires with a color-coded, heat-resistant plastic insulation around them. The National Electrical Code has specific regulations for how many conductor wires can fit within a conduit of each diameter size:

1/2-inch Conduit: Up to 9 of the 12-gauge wires 1/2-inch Conduit: Up to 12 of the 14-gauge wires 3/4-inch Conduit: Up to 16 of the 12-gauge wires 3/4-inch Conduit: Up to 22 of the 14-gauge wires

Can NM Cable be Run Inside Conduit?

If an electrical inspector has flagged NM cable that has been run incorrectly, you might be tempted to install the conduit, then reuse the same NM cable by running it through the new conduit.  This is a subject of some debate among electricians. Some pros argue that NM cable inside conduit may be susceptible to heat build-up and is therefore not allowed. Others take a more lenient view. While the National Electrical Code does not expressly forbid inserting NM cable inside conduit, it is, in practice, very difficult to do so and very few professional electricians will do such an installation.   It is the accepted practice to run only individual THHN conductors (or another approved form of wire) inside the conduit. THHN wires are relatively inexpensive and are much easier to run through conduit because they are thin and have less coating on them.