Violators can be fined, arrested or jailed for making ugly faces at a dog.