ignorance of the law is no excuse for breaking it
Someone cannot use their lack of knowledge as an excuse for doing something wrong or illegal. A: "Officer, I had no idea there was a curfew around here." B: "Well, ignorance of the law is no excuse for breaking it."