What is the meaning of Illegality?

the state of being illegal

a defense to the validity of a contract because it was in violation of the law

Source: wiktionary.org