Kidushin4: 8
הָאוֹמֵר: ,,בְּנִי זֶה מַמְזֵר” — אֵינוֹ נֶאֱמָן. וַאֲפִלּוּ שְׁנֵיהֶם אוֹמְרִים עַל הָעֻבָּר שֶׁבְּמֵעֶיהָ: ,,מַמְזֵר הוּא” — אֵינָם נֶאֱמָנִים. רַבִּי יְהוּדָה אוֹמֵר: נֶאֱמָנִים.
One who says: “ This son of mine is a mamzer,” is not believed. Even if they both say, concerning the fetus in her womb: “ He is a mamzer,” they are not believed. R’ Yehudah says: They are believed.