It shall be unlawful for any owner or custodian of any unspayed female dog, while such dog is in season, to allow the dog to be or remain other than upon the premises of the owner or custodian of such dog confined at all times in a proper and adequate enclosure.