This is known as "contravene." When you say contravene, this means that you are going to contradict something or someone. There are instances when people may do an act that is against the law, but they believe that they are only doing this because this will allow them to reach their goals.
There are different punishments that may be given depending on the type of contravention done by people. There are some who would need to pay a fine. This is considered to be minor, and people can get on with their normal lives. Some would require people to spend time in jail for three days or less.