Short answer
Using a condom as a method of contraception does not by itself invalidate a valid Nikah. Contraception and the validity of the marriage contract are separate matters.
Islamic Guidance
What Islam teaches
The validity of Nikah depends on the requirements of a valid Islamic marriage contract. Temporary contraception is a separate jurisprudential issue discussed by scholars.
Practical Guidance
What you can consider
Couples should not confuse questions about family planning with the validity of their marriage. For a specific legal ruling, consult a qualified scholar.
Sources
Sahih al-Bukhari, Book of Marriage; Sahih Muslim, Book of Marriage.