A rail fence five feet high, with the rails not more than 18 inches apart from the ground to the height of every three feet, shall be a lawful fence so far as cattle and equine or equidae are concerned.