Eagle FL VI SPE, LLC (Eagle) and Branch Banking & Trust Co. (BB & T) seek certiorari review of the nonfinal order that denies Eagle’s and BB & T’s motions for protection from discovery and compels *952their corporate representatives to attend depositions. We grant the petition and quash the order.
BB & T obtained a foreclosure judgment against respondent Cypress Creek Plaza, LLC, and its guarantors. Thereafter, BB & T assigned its interest in the final judgment of foreclosure to Eagle, and Eagle was substituted in the foreclosure action as plaintiff. Eagle moved for a deficiency judgment against the guarantors, William D. Drost, T & A Family Partnership, Ltd., and Lawrence T. Maxwell. Respondents Drost and T & A Family Partnership, Ltd. reached a mediated settlement agreement with Eagle and stipulated to the deficiency judgment, which the trial court approved. Maxwell, however, refused to settle the matter and went to trial. The trial court in Maxwell’s case found that Eagle lacked standing to obtain a deficiency judgment against the guarantors because Eagle had merely become the assignee of the final judgment of foreclosure, which was effective only in rem. This court affirmed the decision. Eagle FL VI SPE, LLC v. Maxwell, 105 So.3d 530 (Fla. 2d DCA 2013) (table decision).
Upon learning of the outcome of Maxwell’s trial, the respondents filed a motion to set aside their stipulation for a deficiency judgment. Before the motion was heard, the respondents sought to depose corporate representatives of Eagle and BB & T. Eagle and BB & T refused to produce any witnesses and moved for protection from discovery. The trial court denied their motions. Eagle and BB & T ask this court to quash the order denying protection from discovery, alleging that the trial court departed from the essential requirements of the law in ordering further discovery when a valid settlement has been reached.
Review by certiorari is appropriate when a discovery order departs from the essential requirements of law, causing material injury to a petitioner throughout the remainder of the proceedings below and effectively leaving no adequate remedy on appeal. Martbw-Johnson, Inc. v. Savage, 509 So.2d 1097 (Fla.1987), superseded by statute on other grounds, § 768.72, Fla. Stat. (1989). The trial court’s order departs from the essential requirements of the law because it compels extensive discovery when there is no pending claim or defense. See Fla. R. Civ. P. 1.280(b)(1) (stating that discovery must be “relevant to the subject matter of the pending action”) (emphasis added).
The parties reached a settlement and stipulated to a deficiency judgment. Although the respondents have moved to set aside their stipulation, the trial court has not ruled on the motion. Therefore, the settlement and stipulation remain in effect and bar any further discovery. See Carter v. Carter, 3 So.3d 397, 398 (Fla. 4th DCA 2009) (holding that the former husband should not be compelled to produce the discovery requested by the former wife “unless and until the court first determines the validity of the parties’ settlement agreement”). Settlements are presumed to be valid and to have been entered into by the parties with full knowledge of all relevant facts and issues. See Petracca v. Petracca, 706 So.2d 904, 912 (Fla. 4th DCA 1998) (“[Tjhere can be no question of the adequacy of knowledge when an adversarial party has had the opportunity of ... discovery under the applicable rules of procedure.”). The respondents were represented by counsel and had sufficient opportunity to engage in discovery before entering into the settlement agreement. They had, or could have obtained, the documents from which the alleged mistake could have been found. See Carter, 3 So.3d at 398 (noting that the former wife failed to seek discovery of her former hus*953band’s financial resources before reaching a settlement despite the possibility of having incomplete knowledge). By entering into the settlement agreement, the respondents’ challenges to Eagle’s standing to seek a deficiency judgment were waived. See Schuster v. Blue Cross & Blue Shield of Fla., Inc., 843 So.2d 909, 912 (Fla. 4th DCA 2003) (“There is no question that lack of standing is an affirmative defense that must be raised by the defendant and that the failure to raise it generally results in waiver.”).
Because the settlement agreement and approved stipulation remain in effect, the trial court departed from the essential requirements of the law in ordering discovery. Accordingly, we grant the petition for writ of certiorari and quash the order.
Petition granted.
SLEET, J., Concurs. ALTENBERND, J. Concurs with opinion.