Sa'id bin al-Musayyab (may Allah have mercy on him) was asked about a woman who stipulates to her husband that he will not take her out of her town, and Sa'id bin al-Musayyab (may Allah have mercy on him) said: He may take her if he wishes.
(b) Al-Sha'bi (may Allah have mercy on him) said about a man who married a woman on the condition that she would stay in her house: Her husband is her house.
(c) Sayyiduna Amr bin al-As (may Allah be pleased with him) said: The woman's condition is to be fulfilled.
The view of the majority is preferable.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصداق / 14441