This misfortune befell Jacob as a punishment for his excessive self-confidence. In his negotiations with Laban, he had used the expression, "My righteousness shall answer for me hereafter." Besides, on his return to Palestine, when he was preparing to meet his brother, he concealed his daughter Dinah in a chest, lest Esau desire to have her for wife, and he be obliged to give her to him. God spoke to him, saying: "Herein hast thou acted unkindly toward thy brother, and therefore Dinah will have to marry Job, one that is neither circumcised nor a proselyte. Thou didst refuse to give her to one that is circumcised, and one that is uncircumcised will take her. Thou didst refuse to give her to Esau in lawful wedlock, and now she will fall a victim to the ravisher's illicit passion."
Faith of Laban
Legends of the Jews 6:215