i measured mine from the grip to the end of the barrel and if it had a pistol grip instead, it comes to about 29". fully within the confines of the law.
I bought the pistol grip for my Mossberg when I bought the 18 1'2" barrel. It's fun to shoot but it reminds your hand and wrist real quick that a stock is the intended way to hold a shotgun. But it fits neatly in the truck.