It depends. If your ignorance is excused your prayers are valid. If not then they are invalid and must be repeated.
Basically your ignorance is excused if you really tried your best to know all the laws of Salat, and you were misinformed about this particular point. Or you really did your best to learn it and you though you knew what that you were 100% pure. The idea is that you were not negligent in any way. You really did your best to learn.