At my last foster parents ranch we built an 18 foot post and field wire fence to keep the deer out and they got into the garden regularly.
I have used electric for years on my horses but it has no effect on the deer they simply jump over it. The elk and moose simply walk through it and string a quarter mile of wire across my hay field dragging it along with them as they walk through the field. Thankfully it doesn't break my wire I bought 3 miles of the heaviest gauge wire I could find and use that now, it holds up to them but there is no way to keep the wire in place when a 1,500 pound elk or a 2,500 pound moose walks through it. It also doesn't manage to keep any of the free range cows out either, by mid august I just have to pull the fence in or the cattle tear it down every day to get to my ponds for water.