illegality

noun
  1. 1

    The state of being illegal

    โ€œThe criminal was aware of the illegality of his act.โ€

  2. 2

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

    โ€œWhen sued for refusing to pay for services provided by a prostitute, the customer raised the defense of illegality.โ€

Antonyms

Source: https://en.wiktionary.org/wiki/illegality