There is nothing more purposeful and beautiful than to have your last act on earth as an expression of your faith. Many people are guiding by the teachings of their religion when planning their estate. Jewish law, as an example, has some very specific requirements for a will to be properly Halachic.
There is never any problem taking care of your expression of faith and writing your will in accordance to your religion. It will take some guidance from your Rabbi, Priest, Pastor or Imam to be sure that the prescriptions are followed.
Halachic wills, as an example
Jewish law is very specific on a number of issues related to wills, particularly who receives a portion of the estate. Such a will is called Halachic, and is usually written with the assistance of a Rabbi.
Such wills are not particularly unusual, but they have to be written with care. They require that any minor children have to be taken care of, for example, which is easily done by setting up a minor trust. Surviving daughters are required to be provided with a dowry from the estate for when they marry as well. All of these provisions can easily be written into any standard will.
Any estate planning attorney will have no problem working with the requirements of a Halachic will. It is your estate and you get to make the decisions.
What cannot be done?
There are only a few things which cannot be in a will. For example, you cannot require someone to do something illegal in order to inherit money. You also cannot force them to do something unrelated to the money in order to receive it, such as change religion.
You can, however, provide funds related to any activity such as getting married or going to college. There are literally no religious provisions that cannot be worked out in some manner for the purposes of your will.
How to make it happen
The first step is to talk to your spiritual advisor or religious leader and ask if there are any specific requirements. They probably have a guide for both you and any attorney that will be writing the will for you.
Any estate planning attorney will have no problem following these requirements and putting them into a will for you. That way you can be assured that your faith will guide your family even after you are gone.