According to local law the dog still has to be leashed or behind a fence.
That seems perfectly reasonable. Sounds like a fine would have been in order.