Short answer. Yes. Article 874 of the Civil Code expressly allows a testator to bequeath the right of usufruct to any person for the time during which that person remains unmarried or in widowhood. This kind of time-limited usufruct is valid and enforceable.
What the law says
the right of usufruct, or an allowance or some personal prestation may be devised or bequeathed to any person for the time during which he or she should remain unmarried or in widowhood
Civil Code, Article 874 — Conditions About Marrying. Read the full provision →
The general rule: absolute no-marriage conditions are void
Article 874 of the Civil Code begins with a protective rule: an absolute condition not to contract a first or subsequent marriage is considered as not written — in other words, void. The Civil Code does not allow a testator to forbid someone from ever marrying. People have a right to marry, and a total prohibition on that right, even if buried in a will, has no legal force. The bequest itself survives; the absolute condition is simply struck out.
The exception for widows and widowers
The article then creates a limited exception to the rule against no-marriage conditions. When the condition not to remarry is imposed on a widow or widower by the deceased spouse, or by that spouse's ascendants or descendants, the absolute condition is allowed. A deceased husband who wishes to condition a bequest to his widow on her not remarrying — or the deceased's parents or children who do the same — may do so. This exception reflects a policy accommodation for legitimate testamentary interests in the surviving family unit.
The usufruct-while-single form: always valid
Separate from and independent of the absolute condition exception, the article creates another valid form: leaving a usufruct, an allowance, or a personal prestation to any person for the time during which he or she should remain unmarried or in widowhood. This is a time-limited benefit, not an absolute prohibition. The beneficiary is free to marry whenever they choose — but the usufruct ends when they do. No one is forbidden from marrying; they are simply informed that the benefit runs only for as long as they remain single. This distinction is what makes the time-limited usufruct valid where an absolute prohibition would be void.
How this plays out in practice
If a will leaves a surviving spouse the right to live in and enjoy the family home for as long as she remains unmarried, that arrangement is valid under Article 874. The widow enjoys full use of the property during her widowhood. The moment she remarries, the usufruct ends and the property passes to whoever the will designates as next in line — typically the children or other heirs. If the will is silent about who receives the property after the usufruct ends, that gap needs to be filled by interpretation or by the rules of succession. A lawyer reviewing the will can clarify what happens when the usufruct terminates.