Case-within-a-case rule is a principle applicable in torts law. According to this rule, a legal-malpractice claimant must show that, but for the attorney's negligence, the plaintiff would have won the case underlying the malpractice action. The rule applies even if the negligent actions of the attorney resulted in a total foreclosure of the underlying case being heard on its merits.
The following is a caselaw on the rule:
A legal malpractice claimant must show that a duty existed, that the duty was breached, and that the breach was the proximate cause of plaintiff's damages. To establish proximate cause, the claimant must show that it would have prevailed in the underlying suit but for the attorney's negligence. This is often referred to as the "case within a case."[Zurich Am. Ins. Co. v. Hughes, Watters & Askanase, L.L.P., 2006 Tex. App. LEXIS 6037, 3-4 (Tex. App. Eastland July 13, 2006)]