Genesis 38:26 NIV

26 Judah recognized them and said, "She is more righteous than I,1 since I wouldn't give her to my son Shelah.2" And he did not sleep with her again.

References for Genesis 38:26