What part of speech is invalid?

The word invalid is an adjective. It describes something that is not valid.