Ignorantia juris non excusat

Ignorantia juris non excusat or ignorantia legis neminem excusat (Latin for "ignorance of the law excuses not" and "ignorance of law excuses no one" respectively) is a legal principle holding that a person who is unaware of a law may not escape liability for violating that law merely by being unaware of its content. 
European-law countries with a tradition of Roman law may also use an expression from Aristotle translated into Latin: nemo censetur ignorare legem (nobody is thought to be ignorant of the law) or ignorantia iuris nocet (not knowing the law is harmful).
Explanation.
The rationale of the doctrine is that if ignorance were an excuse, a person charged with criminal offenses or a subject of a civil lawsuit would merely claim that one was unaware of the law in question to avoid liability, even if that person really does know what the law in question is. Thus, the law imputes knowledge of all laws to all persons within the jurisdiction no matter how transiently. Even though it would be impossible, even for someone with substantial legal training, to be aware of every law in operation in every aspect of a state's activities, this is the price paid to ensure that willful blindness cannot become the basis of exculpation. Thus, it is well settled that persons engaged in any undertakings outside what is common for a normal person will make themselves aware of the laws necessary to engage in that undertaking. If they do not, they cannot complain if they incur liability.
The doctrine assumes that the law in question has been properly promulgated—published and distributed, for example, by being printed in a government gazette, made available over the internet, or printed in volumes available for sale to the public at affordable prices. In the ancient phrase of Gratian, "Leges instituuntur cum promulgantur" ("Laws are instituted when they are promulgated"). In order that a law obtain the binding force which is proper to a law, it must be applied to the men who have to be ruled by it. Such application is made by their being given notice by promulgation. A law can bind only when it is reasonably possible for those to whom it applies to acquire knowledge of it in order to observe it, even if actual knowledge of the law is absent for a particular individual. A secret law is no law at all.
In criminal law, although ignorance may not clear a defendant of guilt, it can be a consideration in sentencing, particularly where the law is unclear or the defendant sought advice from law enforcement or regulatory officials. For example, in one Canadian case, a person was charged with being in possession of gambling devices after they had been advised by customs officials that it was legal to import such devices into Canada. Although the defendant was convicted, the sentence was an absolute discharge.
In addition, there were, particularly in the days before satellite communication and cellular phones, persons who could genuinely be ignorant of the law due to distance or isolation. For example, in a case in British Columbia, a pair of hunters were acquitted of game offenses where the law was changed during the period they were in the wilderness hunting. In reaching this decision, the court refused to follow an early English law case in which a seaman on a clipper before the invention of radio was convicted even though the law had been changed while he was at sea.
In literature.
The doctrine, "Ignorance of the law is no excuse," first shows up in the Bible in Leviticus 5:17: "If a person sins and does what is forbidden in any of the LORD's commands, even though he does not know it, he is guilty and will be held responsible." An alternate explanation of the origin of the maxim, though not particularly relevant to the modern context, can be found in the philosophy of the Greeks and Romans. Such were cultures heavily influenced by customary legal systems. Within such a system, law is learned as a person participates in the culture and customs of the community. Thus it is unreasonable to believe a person could have avoided learning them. These rules and customs were also interwoven with ethical and religious dialogue so that laws expressed what is right and that which is not. We find that Cicero wrote the following in "De re publica" (On the Republic):
There is a true law, right reason, agreeable to nature, known to all men, constant and eternal, which calls to duty by its precepts, deters from evil by its prohibition. This law cannot be departed from without guilt. Nor is there one law at Rome and another at Athens, one thing now and another afterward; but the same law, unchanging and eternal, binds all races of man and all times.
Minos (attributed to Plato) states the following conversation between Socrates and his companion:
Translation.
Presumed knowledge of the law is the principle in jurisprudence that one is bound by a law even if one does not know of it. It has also been defined as the "prohibition of ignorance of the law".
The concept comes from Roman law, and is expressed in the brocard "ignorantia legis non excusat".
The essential public character of a law requires that the law, once properly promulgated, must apply to anyone in the jurisdiction where the law applies. Thus, no one can justify his conduct on the grounds that he was not aware of the law.
Generally, a convention exists by which the laws are issued and rendered accessible by methods, authors and means that are simple and well known: the law is readable in certain places (some systems prescribe that a collection of the laws is copied in every local city council), is made by certain authorities (usually sovereign, government, parliament, and derivative bodies), and enters into effect in certain ways (many systems for instance prescribe a certain number of days - often 15 - after issue). This is commonly intended as a constitutional regulation, and in fact many constitutions or statutes exactly describe the correct procedures.
However, some recent interpretations weaken this concept. Particularly in civil law, regard can be had to the difficulty of being informed of the existence of a law considering the lifestyle of the average citizen. On the penal side, the quality of the knowledge of the law can affect the evaluation of the animus nocendi or the mens rea, in that certain subjective conditions can weaken personal responsibility.
The theme was widely discussed, also for political reasons, at the time of the Enlightenment and in the 18th century, given the heavy proportion of illiterate citizens in European countries (who would have some difficulties being aware of all the laws in a country). It was then argued that both the presumed knowledge and the heavily increasing corpus of national legislation were working in favour of lawyers rather than citizens.
In recent times, some authors have considered this concept as an extension of (or at least as analogous to) the other ancient concept (typical of criminal law) that no one can be punished under a law that was issued after the action was committed (non-retroactivity of the law. See ex post facto). This interpretation is however disputed, given that the matter would hierarchically more properly refer to a constitutional doctrine rather than to a civil or penal one.
Some modern criminal statutes contain language such as stipulating that the act must be done "knowingly and wittingly" or "with unlawful intent," or some similar language. However, this does not refer to ignorance of laws, but having criminal intent.
Statutory law.
This principle is also stated in statutes:
Exceptions.
In some jurisdictions, there are exceptions to the general rule that ignorance of the law is not a valid defense. For example, under U.S. Federal criminal tax law, the element of "willfulness" required by the provisions of the Internal Revenue Code has been ruled by the courts to correspond to a "voluntary, intentional violation of a known legal duty" under which an "actual good faith belief based on a misunderstanding caused by the complexity of the tax law" is a valid legal defense. See Cheek v. United States.
In "Lambert v. California" (1957), the Supreme Court of the United States ruled that a person who is unaware of a "malum prohibitum" law cannot be convicted of violating it if there was no probability he could have known the law existed. It was subsequently ruled in "United States v. Freed" (1971) that this exception does not apply when a reasonable person would expect their actions to be regulated, such as when possessing narcotics or dangerous weapons.
In "Heien v. North Carolina" (2014), the Supreme Court held that even if a police officer incorrectly believes that a person has violated the law, the officer's "reasonable suspicion" that a law was being broken does not violate the Fourth Amendment.