Water Supply Pipe Problem
I am replacing a faucet in a bathroom. When removing the shut off valve, the compression ring deformed about an inch of the copper water supply pipe coming from the wall. As you can see in the pic, I cut off the damaged portion of the pipe but was left with only about a 1/2 off copper pipe coming out of the drywall under the sink (I temporarily capped the pipe with an end cap). There's approximately 1 and 1/2 inch of pipe through the drywall until it hits a pipe holder (in the pic, the tan portion under the pipe.)
1. Does code specify the length of copper supply pipe that comes out of the wall? Could I put an angle stop on the short pipe that remains outside the drywall?
2. What's my best option right now for connecting a new angle stop?
I could call a plumber but I'd really like to finish the job myself.
Thank you for any help.