State law takes precedence over a provision in a Will.  A provision in a Will cannot violate state law.  The entire Will is not invalidated.  The invalid provision can be excised and the remainder of the Will can be enforced without that provision.