I used a wye filter and had no problem installing it inside a
valve box.
To install a valve box, you dig a hole the width and length of the valve box and about 4" deeper than the valve box. Place 4" of gravel in the bottom of the hole (keeps burrowing animals from digging into your box, and is a good medium to position the box) and place the box on top of the gravel. Make sure you either close the side holes or place more gravel around them to again keep animals out. Then finish burrying the box so that the lid is at ground level. The pipes can either come through the side holes, you can cut more holes yourself, or the pipe can come up through the gravel into the box.
In my case, PVC pipe came up out of the gravel in one corner, turned 90 degrees and into the wye filter, with the filter element pointing to the center of the box to give me room to remove the filter element, then a 180 degree turn into a backflow preventer, then 90 back down into the gravel. Using a standard rectanguler box, I have room to serivce both the wye filter and the backflow preventer.