Too much movement while performing prayer renders it invalid and it is impermissible for the praying person to make movements deliberately, even a few. This is in order to be on the safe side as far as the teachings of Sharia are concerned.
Some scholars stated that making movements, while praying, for teaching children how to pray is reprehensible and cannot be considered a sound excuse, because this mission can be accomplished before or after prayer.
Moreover, it is stated in [Mughni Al-Muhtaj 1/199] (What means):" Too much movement while performing obligatory prayer renders it invalid save when performing the prayer of fear and voluntary prayer while on a ride since too many or a few movements in these two cases, even on purpose, doesn`t invalidate one`s prayer; especially in these too cases." And Allah knows best.