Deuteronomy 23:2

NLT
New Living Translation

2“If a person is illegitimate by birth, neither he nor his descendants for ten generations may be admitted to the assembly of the Lord.