If you have wood studs I know of no code restrictions. I think sheet rock screws make good wood screws for many different applications.
If you have metal studs, the screws won't hold the box solidly to the stud. This may be a violation; I didn't look it up; but many things are done in a pinch. If this is your situation, connect the box to the stud as best you can. Then, once sheet rock is added and your device and faceplate, there won't be a problem because it all goes together to make an adequate installation.
I am NOT saying the box can be free-floating. It should be held more or less in place with the screws. If it is free-floating then you are depending on the faceplate to hold the box and device in place. This is a violation of code.
Copyright © 2026 eLLeNow.com All Rights Reserved.