Granger, C. J.
This ease was once before in this court, and is- reported in 80 Iowa, 662. On that appeal some questions were determined that affect the consideration of the case at this time, the issues on the two appeals being the same. The pleading for the plaintiff, on which issue, was joined, is a substituted petition. The principal facts alleged are that the plaintiff was the owner of a pair of mares running at large, which escaped onto the right of way of1 the defendant through an open gate in the fence inclosing the right of way, and while there they were frightened by a passing train, find ran ipt? a barbed wir§ fence along the *709right of way, and were injured. The particular acts of the defendant on which recovery is sought, and the only ones, are that it ‘ ‘neglected to close said gate, and failed to maintain a fence, as required by section 1289” of the Code.
swertng after ■waiver of errors. I. At the last trial in the district court the cause was submitted to the court without a jury, upon a stipulation for a finding of facts and condusions of law. Many of these conclusions, in view of the questions argued and our , . conclusions, are not important to be set out. The following are among the findings of fact: “Second, that, at the place where the plaintiff’s horses entered the defendant’s right of way, it had the right to fence its right of way, and had fenced it; third, that said horses of the plaintiff entered said right of way through a gate which had been left open by some one unknown; fourth, that said horses were running at large, and not under the control of the owner, at the time they entered on said right of way, and escaped thereon through and by reason of said open gate; fifth, that, while on said right of way, one of the defendant’s trains of cars frightened them, by reason of which fright said horses ran into a barbed wire fence which inclosed said right of way.” As a conclusion of law, the court found the defendant liable.
It will be well to next notice the condition of the record as to the formation of the issues. To the substituted petition there was a demurrer upon two grounds, the court-sustaining it as to the first, and overruling it as to the second. This was followed by a motion to strike from the petition, which was overruled, and this by another demurrer, which was also overruled. The defendant then took issue by answer, after which, came the stipulation and trial. The defendant now urges, in argument, that the district court erred in its rulings on both demurrers *710and the motion to strike. The questions presented can not be considered. If there were errors in the ruling referred to, they were waived by the filing of an answer. Of the many holdings to this effect, we will cite but a few. See Mann v. Taylor, 78 Iowa, 355; Ida Co. v. Woods, 79 Iowa, 148; Randolf v. Town of Bloomfield, 77 Iowa, 50; Pumphrey v. Walker, 71 Iowa, 383; Westphal v. Henney, 49 Iowa, 542; Tootle v. Phœnix Insurance Co., 62 Iowa, 362; Smith v. Powell, 55 Iowa, 215.
2 _. faiIure t0 iveapet?iioen‘' waivor. II. The defendant quotes the second and third findings of fact, and urges that their legal effect is to entitle it to a reversal, and an order for a judgment in its favor. The argument then deals with the sufficiency of the petition in not pleading facts showing negligence or a want of fence. It should be understood that, with the condition of the record, we do not go to the petition to know if it states a cause of action, for wherein it may be defective in that respect the defect is waived by a failure to test its sufficiency by demurrer. These particular objections to the petition were not presented in the demurrers referred to in the other division of the opinion, and, if it should be'conceded that they constitute material defects, they must now be treated as waived, and the petition as stating, for the purposes of the case, a cause of action. Frentress v. Mobley, 10 Iowa, 450. In that case it is said: “The defendant, having taken issue upon the allegations of the petition, admitted thereby that they constituted a cause of action.” It has been repeatedly held that defects in a pleading are waived by a failure to attack the same by motion or demurrer. See Brockert v. Cent. Ia. Railway Co., 82 Iowa, 370, as directly in point; and Linden v. Green, 81 Iowa, 365.
It is to be understood, then, that a recovery could be had on the averments of the petition if sustained by the proofs. To waive the pleading of a material fact *711is to consent that it need not be established as a condition precedent to a right of recovery. As we have said, the only facts pleaded against the defendant are that it neglected to close the gate, and failed to maintain a fence. The court, in its findings, adhered to the issues, and found that it had fenced its line, and that a gate therein had been left open by “some one unknown,” through which the horses entered onto the right of way. The court must have found the defendant liable because of a neglect to close the gate after it was, by some one, left open, and that is the precise ground upon which recovery was sought. It is not for us to say whether or not, in law, it is sufficient, as we are urged to do, for it is now too late to present the question. , The defect, if any, is waived. The evidence is not in the record, and we assume the facts, as found, to have support. Under the issues, if it appeared that the horses were injured because of the defendant’s neglect to close the gate, it became liable. The pleadings concede an obligation on the part of the defendant to look after the gate, or, in other words, they admit its liability for a neglect to close it. The trial was to determine the fact. The district court, in its conclusions of law, omits any finding as to legal liability of the defendant to keep the gate closed, treating it as a proposition not involved in the case under the issues. In fact, the proposition does not seem to have been one of contention in the district court. Under the issues and the facts as found, the defendant was clearly liable. The proposition of the liablity of the defendant for a neglect to close the gate is more elaborately argued under an assignment of error in the refusal of the court to sustain a motion to vacate its judgment. Theforegoing considerations are decisive of that branch of the argument, and it calls for no further attention.
The judgment is aeeibmed.