Nagataga ajnabiyoo we follow shaafi madhab and shaafi madhab has this.
We see the following regarding the kafa’a for marriage in the classic Shafi’i manual of Islamic law titled ‘Umdat as-Salik wa ‘Uddat an-Nasik (Reliance of the Traveller and Tools of the Worshipper):
والكفاءةُ في: النسَبِ والدِّينِ والحريةِ والصَّنعةِ وسلامة العيوبِ المُثْبِتَةِ للخِيار، فلا يُكافئ العجميُّ عربيةً، ولا غيرُ قُرَشيٍّ قُرشيَّةً، ولا غيرُ هاشميٍّ أو مُطَّلبيٍّ هاشميةً أو مطَّلبيةً، ولا فاسقٌ عفيفةً، ولا عبدٌ حرةً، ولا العتيقُ أو من مسَّ آباءَهُ رِقٌّ حرةَ الأصلِ، ولا ذو حِرفَةٍ دنيئةٍ بنتَ ذي حِرفةٍ أرفعَ، كخياطٍ بنتَ تاجرٍ، ولا معيبٌ بعيبٍ يُثْبِتُ الخِيارَ سليمةً منهُ، ولا اعتبارَ باليسارِ والشيخوخةِ، فمتى زوَّجها بغَيْرِ كُفءٍ بغَيرِ رضاها ورِضا الأولياءِ الذينَ هم في درَجتهِ فالنِّكاحُ باطلٌ، وإن رَضُوا أو رضيَتْ فليسَ للأبعدِ اعتراضٌ.
(Taken from the section of Kafa’a in the chapter of Nikaah in the text)
Translation: Kafa’a (Suitability in marriage for a female) is in the lineage (ancestry of the man), and in religiousness, and his being a free man (not a slave), and in his profession, and his being free of defects that can cause the annulment of the marriage. And the ajami (non-Arab) is NOT suitable for an Arab woman, and a non-Qurayshi is NOT suitable for a Qurayshi woman (Quraysh was the tribe of the Holy Prophet (S)), nor is a non-Hashimi or non-Muttalabi suitable for a Hashimi or Muttalabi woman (Hashimitesare the members of the clan to which the Holy Prophet (S) belonged to, and Muttalabites are the descendants of the grandfather of the Holy Prophet(S)). Nor is an immoral man suitable for a virtuous woman, nor is a slave suitable for a free woman, nor is a freed slave or one whose ancestors were touched by slavery suitable for a (free) woman whose ancestors were free. Nor is a man of a lowly profession suitable for the daughter of someone with a noble profession, such as a tailor wanting to marry a tradesman’s daughter.

