It is unlawful for any person to permit any dog which is owned, harbored, or controlled by him to run at large on any farm on which livestock or domestic fowls are kept, without the consent of the owner of the farm, except for herding livestock, hunting or sporting purposes, or any competitive trials when the dog is within reasonable control or call of his owner or the agent of his owner.
Ca. Food and Agric. Code § 30955