Srimad Bhagavatam Canto 06, Chapter 02, Text 26

SB 6.2.26

aho me paramam kastam
 abhud avijitatmanah
yena viplavitam brahma
 vrsalyam jayatatmana
 
Translation by His Divine Grace A. C. Bhaktivedanta Swami Srila Prabhupada:  
 
Ajamila said: Alas, being a servant of my senses, how degraded I became! I fell down from my position as a duly qualified brahmana and begot children in the womb of a prostitute.
 
Purport by His Divine Grace A. C. Bhaktivedanta Swami Srila Prabhupada: 
 
The men of the higher classes — the brahmanas, ksatriyas and vaisyas — do not beget children in the wombs of lower-class women. Therefore the custom in Vedic society is to examine the horoscopes of a girl and boy being considered for marriage to see whether their combination is suitable. Vedic astrology reveals whether one has been born in the vipra-varna, ksatriya-varna, vaisya-varna or sudra-varna, according to the three qualities of material nature. This must be examined because a marriage between a boy of the vipra-varna and a girl of the sudra-varna is incompatible; married life would be miserable for both husband and wife. Consequently a boy should marry a girl of the same category. Of course, this is trai-gunya, a material calculation according to the Vedas, but if the boy and girl are devotees there need be no such considerations. A devotee is transcendental, and therefore in a marriage between devotees, the boy and girl form a very happy combination.
Srimad Bhagavatam Canto 06, Chapter 02, Text 24-25
Srimad Bhagavatam Canto 06, Chapter 02, Text 27