Is the prayer still valid with excessive movements?
All praise is due to Allah, the Lord of the Worlds, the Beneficent, the Merciful, and the Master of the Day of Judgment.
The Muslim must perform his prayer with deep reverence in both his heart and body. As the Almighty Allah says:
Certainly will the believers have succeeded. They who are during their prayer humbly submissive. (Al-Mu’minun 23:1-2)
Tranquility during prayer is one of the prerequisites of its validity. Therefore, the Prophet (peace be upon him) said to the man who did not offer prayer with tranquility: “Go back and pray, for you have not prayed…” He repeated it three times, then the man said to the Prophet, “By the One Who sent you with the truth, I cannot do better than that; teach me.” The Prophet (peace be upon him) said: “When you stand to pray, perform ablution properly…until he said: “and then bow with tranquility until you feel at ease, then rise from bowing until you stand straight, and then prostrate calmly (and remain in prostration) until you feel at ease, and do the same in whole of your prayer.” (Al-Bukhari and Muslim)
Based on that, tranquility is one of the pillars of the prayer and without it the prayer is invalid. Whoever pecks like a crow during the prayer, it will not be accepted. The Muslim must pay great interest to his prayer and observe tranquility in it. It is disapproved to be occupied with beard or clothes, as excessive movements invalidate the prayer.
The movements during prayer have no standard or a measure to give a ruling about. For example, if a worshiper sees that he has done excessive movements, he must repeat his prayer as it is invalidated. On the other hand, if the worshiper has done a little movement, his prayer is still valid. This is because the Prophet (peace be upon him) has opened the door for `A’ishah (may Allah be pleased with her) while offering prayer. It is also narrated that Abu Qatadah (may Allah be pleased with him) said: “The Messenger of Allah (peace be upon him) was leading the people in prayer with Umamah, daughter of Zainab daughter of the Messenger of Allah, in his lap. When he prostrated, he would put her down and when he got up (after prostration) he would lift her up. (Abu Dawud)
Source: Translated and adapted from islamweb.net.