Rule 57 of the Highway Code
When in a vehicle make sure dogs or other animals are suitably restrained so they cannot distract you while you are driving or injure you, or themselves, if you stop quickly. A seat belt harness, pet carrier, dog cage or dog guard are ways of restraining animals in cars.
There is a difference between being restrained and secured. As long as the dog(s) can't distract the driver while they are driving, or in the case of having to stop quickly, knock into the driver and harm themselves then whatever you use is legal.
I'd prefer my dogs to hit the back of the seats than the wire mesh of a crate or being suddenly pulled up short by a lead or harness. They do have their leads attached to an anchor point but have enough slack so they don't get pulled up before hitting the seat back. And to be honest if you are in a bad enough accident that the car rolls the dogs and yourself are going to be badly injured no matter how you or they are restrained.