Interestingly, our house is surrounded on 2 sides by a farmer's field where he routinely keeps cattle. The top 2 strands of the fence are "protected" by 240v electric
There's a couple of little yellow signs warning of the electric fence dotted about but it would appear that it's totally legal to do.
I've only clobbered myself a couple of times