In cases where an engineer's work fails, he may be subject to the law of tort of negligence, and in extreme cases, criminal charges.[21] An engineer's work must also comply with numerous other rules and regulations such as building codes and environmental law.