Short answer. No. Article 872 forbids it. A testator cannot impose any charge, condition, or substitution on the legitime the law reserves for a compulsory heir. If you try, the condition is simply treated as not written, and the child keeps the legitime free and clear while your will otherwise stands.
What the law says
The testator cannot impose any charge, condition, or substitution whatsoever upon the legitimes prescribed in this Code. Should he do so, the same shall be considered as not imposed.
Civil Code, Article 872 — But Never on the Legitime. Read the full provision →
The legitime is protected ground
The legitime is the portion of the estate the law reserves for compulsory heirs — chiefly your children — and it is not yours to give away or fence in. Article 872 makes that protection concrete: the testator cannot impose any charge, condition, or substitution whatsoever upon the legitimes prescribed in this Code. A charge would burden the inheritance with some obligation; a condition would make it depend on an event or on the heir's behaviour; a substitution would redirect it to someone else. All three are barred as against the legitime. The law treats this reserved share as belonging to the heir by force of law, not as a gift you may hedge with strings.
What happens to a condition you write anyway
Crucially, a forbidden condition does not poison the inheritance. The article provides that should he do so, the same shall be considered as not imposed. So the offending charge, condition or substitution is struck out and ignored, while the legitime itself passes to the child unencumbered. You do not disinherit the child by over-reaching, and the child does not have to satisfy the condition to receive the share. The result is the opposite of what the controlling testator intended: the string is cut, and the reserved portion is delivered clean.
Where you are still free to impose terms
The rule bites only on the legitime. The estate also has a free portion — the part not reserved by law — and there you retain real latitude. Conditions, charges and substitutions that would be void if aimed at the legitime can validly attach to legacies and devises taken from that free portion. So a testator who genuinely wants to condition a benefit should draw it from what the law leaves at his disposal, not from the protected share. The practical craft of estate planning lives largely in that distinction between the reserved legitime and the disposable free portion.
The limits of this article
Article 872 governs conditions on the legitime; it is not the whole law of the legitime. It does not fix how large the legitime is, which depends on who the compulsory heirs are, nor does it address the separate ground of valid disinheritance, which requires a specific legal cause stated in the will. A narrow, time-limited direction that the estate not be partitioned for a stated period is treated differently and is not the kind of charge this article voids. And the article speaks to conditions a testator writes, not to obligations the law itself already attaches to an inheritance.