Answered by Shaykh Hamza Karamali, SunniPath Academy Teacher
According to the Shafi’i school, for a woman, even one strand of exposed hair will invalidate a prayer. Also, when performing sujud, ones forehead must touch the surface (e.g. cloth, floor) one is praying on. I have many wisps of hair growing near my hairline, and sometimes, when trying to make sure all these wisps are covered during prayer, leaves me with very small surface of forehead to touch the ground. Would it be better to make sure that enough surface of my forehead touches ground during sujud (and risk wisp of hairs showing) or to make sure the wisps of hair is covered and risk forehead not touching ground.
In the Name of Allah, Most Merciful and Compassionate
(1) You must ensure that none of the hair that grows outside the limits of your face shows during the prayer. In order to ensure this, you will probably have to cover part of your forehead (but not very much).
(2) If the hair grows within the limits of your face, it is not necessary for you to cover it during the prayer. Some people have unusually low hairlines at the top of their face: the hair that grows here does not need to be covered during prayer. The boundary between the face and head at the top of the face is where the hairline normally begins.
(3) During prostration, some part of the forehead must touch the ground. All the forehead does not have to touch the ground. Any amount is enough (even if small).
(4) If you cover all your hair before you begin praying, and then notice some hair showing outside your hijab later on after you have finished praying, then you may assume that the hair became uncovered at the latest possible time and your prayer will be valid.
And Allah knows best.