Conditions of Worship in Islam
Question

What are the conditions of worship in Islam?
Praise be to Allah.Shaykh Muhammad ibn Salih ibn ‘Uthaymin (may Allah have mercy on him) said: 

“Firstly: the worship must be in accordance with Shari`ah in its reasons. Any person who worships Allah by doing an act of worship that is not done for a reason proven in Shari`ah is doing an act of worship that will be rejected and is not enjoined by Allah and His Messenger. 

An example of that is celebrating the Mawlid or birthday of the Prophet (peace and blessings of Allah be upon him), or celebrating the twenty-seventh night of Rajab, claiming that the Prophet (peace and blessings of Allah be upon him) was taken up into heaven on that night. This is not in accordance with Shari`ah so it is to be rejected. 

There is no historical proof that the Mi'raj (ascent into heaven) of the Prophet (peace and blessings of Allah be upon him) took place on the twenty-seventh night of Rajab. The books of hadith that we have do not contain even a single letter that indicates that the Prophet (peace and blessings of Allah be upon him) was taken up into heaven on the twenty-seventh night of Rajab. It is known that this is the kind of information that cannot be accepted without sound isnads.
Even if it were proven, do we have the right to innovate some kinds of worship on that date or to make it a festival? Not at all. Hence when the Prophet (peace and blessings of Allah be upon him) came to Madinah and saw that the Ansar had two days on which they would play, he said: “Allah has replaced these for you with something better,” and he mentioned to them ‘Eid al-Fitr and ‘Eid al-Adha. This indicates that the Prophet (peace and blessings of Allah be upon him) disliked any festival to be innovated in Islam apart from the Islamic festivals, of which there are three: the two annual ‘Eids, which are ‘Eid al-Fitr and ‘Eid al-Adha, and the weekly festival which is Friday. Even if it were proven that the Messenger (peace and blessings of Allah be upon him) was taken up into heaven on the twenty-seventh of Rajab – which it is impossible to prove – we cannot innovate anything on that occasion without the permission of the Lawgiver.

As I have said to you, bid’ah (innovation) is a serious matter which has a bad effect on the heart even if a person feels softness in his heart at that moment. For the matter will subsequently be the opposite, because if the heart rejoices in falsehood, that joy will not last, rather it will be followed by pain and regret. Every bid’ah is serious because it implies criticism of the Messenger, because this bid’ah implies that the Messenger (peace and blessings of Allah be upon him) did not bring the complete Shari`ah, even though Allah says (interpretation of the meaning): 
“This day, I have perfected your religion for you, completed My Favour upon you, and have chosen for you Islam as your religion” [Al-Maidah 5:3]
It is strange that you find some of those who indulge in these innovations strongly urge people to follow them, but they are negligent about matters which are more beneficial, more sound and more useful. 
Hence we say that celebrating the night of the twenty-seventh of Rajab as the night in which the Messenger of Allah (peace and blessings of Allah be upon him) was taken up into heaven is a bid’ah, because it is based on something that is not mentioned in Shari`ah. 

Secondly: the act of worship should be in accordance with Shari`ah in its type or nature.

For example, if a person were to sacrifice a horse, that would be contrary to the Shari`ah in the nature of the action. Because a sacrifice can only involve an animal of the an'am class, namely a camel, a cow or a sheep. 

Thirdly: the act of worship must be in accordance with Shari`ah in its amount. If someone were to say that he was going to pray Zuhr as six rak'ahs, would this act of worship be in accordance with Shari`ah? Not at all, because it is not in accordance with it in terms of the amount or number. If someone were to say Subhan Allah (Glory be to Allah), al-Hamdu Lillah (praise be to Allah) and Allahu akbar (Allah is Most Great) thirty-five times following a prescribed prayer, would this be correct? The answer is that if your aim is to worship Allah by saying it this number of times because you believe this is the proper way, then you are mistaken. If you deliberately add something to what the Messenger of Allah (peace and blessings of Allah be upon him) has prescribed, but you believe that the proper way prescribed in Islam is thirty-three, then the extras are fine, because you are not suggesting that the higher number is the proper way that is prescribed. 
Fourthly: The act of worship must be in accordance with Shari`ah in how it is done. 

If a person does an act of worship that is acceptable in its type, amount and reason, but he goes against Shari`ah in the manner in which he does it, then it is not valid. For example, a man breaks wind etc. and does wudu, but he washes his feet and then wipes his head, then washes his hands, then washes his face – is his wudu valid? Not at all, because he has gone against Shari`ah in the way in which he did it. 

Fifthly: the act of worship must be in accordance with Shari`ah with regard to its timing. 

For example, if a person fasts Ramadan in Sha’ban, or in Shawwal, or he prays Zuhr before the sun has passed its zenith, or after the shadow of an object becomes equal in length to it – because if he prays before the sun has passed its zenith he is praying before the time has come, and if he prays after the shadow of an object becomes equal in length to it he is praying after the time has gone –his prayer is not valid. 
Hence we say that if a person deliberately does not pray until the time for that prayer is over, with no valid excuse, his prayer will not be accepted even if he prays a thousand times. Hence we follow an important principle in this regard which is that in the case of every act of worship that is to be done at a certain time, if a person does it outside of the proper time with no valid excuse, it will not be accepted, rather it will be rejected. 
The evidence for that is the hadith of `Aishah (may Allah be pleased with her) who said that the Prophet (peace and blessings of Allah be upon him) said: “Whoever does an action that is not in accordance with this matter of ours (i.e., Islam) will have it rejected. 

Sixthly: the act of worship must be in accordance with Shari`ah with regard to the place where it is done. 

If a person stands in Muzdalifah on the day of ‘Arafah, this standing is not valid, because the act of worship is not in accordance with Shari`ah with regard to the place where it is done. Similarly, for example, if a person were to do i'tikaf in his own house, that would not be valid, because the place of i'tikaf is the mosque. Hence it is not valid for a woman to do i'tikaf in her house, because this is not the place for i’tikaf. The Prophet (peace and blessings of Allah be upon him) saw some of his wives had set up tents in the mosque; he told them to take them down and not to do i’tikaf, but he did not tell them to do i'tikaf in their houses. This indicates that the women should not do i'tikaf in their houses because that goes against Shari`ah with regard to the place where it is done. 
So with regard to these six factors, an act of worship is not regarded as following Shari`ah unless it combines all six: 

Reason
Type
Amount
Manner
Time
Place

And Allah knows best.