Whenever the electors of any town shall have made any rule or regulation prescribing what shall be deemed a sufficient division fence in such town, any person who shall thereafter neglect to keep a fence according to such rule or regulation shall be precluded from recovering compensation for damages done by any beast lawfully kept upon the adjoining lands that may enter therefrom on any lands of such person, not fenced in conformity to the said rule or regulation, through any such defective fence. When the sufficiency of a fence shall come in question in any action, it shall be presumed to have been sufficient until the contrary be established.
N.Y. Town Law § 307