Even though it is termed as a national code, the NEC is not federal law. It is enforced by states and municipalities that have adopted it as their own standard.