diff --git a/src/ReactFinalForm.test.js b/src/ReactFinalForm.test.js index 5b6c575..b162bbb 100644 --- a/src/ReactFinalForm.test.js +++ b/src/ReactFinalForm.test.js @@ -991,3 +991,33 @@ describe("ReactFinalForm", () => { expect(getByTestId("password").value).toBe("f1nal-f0rm-RULEZ"); }); }); + +describe("Issue #914 – nested Field with validator causing Maximum update depth", () => { + it("should not throw Maximum update depth exceeded when nesting Fields with validators", () => { + // https://github.com/final-form/react-final-form/issues/914 + const required = (value) => (value ? undefined : "Required"); + + expect(() => { + render( +
+ )} + , + ); + }).not.toThrow(); + }); +});