If there are at least 5 other bhikkhus present at the Upasampada ceremony then it would be valid, even though the Upajjhaya (preceptor) -- if he was parajika, i.e. not real bhikkhu -- would not count. Remember, it is the Sangha that "accepts" the new candidate, not the Upajjhaya who "ordains him". The role of the Upajjhaya is merely to give instruction. So ordaining without a valid Upajjhaya would just be a dukkata offence (if I remember well).
Kiṃkusalagavesī anuttaraṃ santivarapadaṃ pariyesamāno... (MN 26)
- Theravada texts
- Translations and history of Pali texts
- Sutta translations