It shall be the duty of any owner, custodian or harborer of any female dog in heat within the city, when she is left unattended, to securely confine such dog inside a building or other enclosure to prevent such dog from coming into contact with another dog except for planned breeding.