The short answer is: It depends. On context as well as a boatload of other things.
Which, in truth, is not a particularly helpful answer, I know. But it's the best one we have.
(Or at least the best one that doesn't take up 20,000+ words.)
The California Supreme Court has to wade into all this in deciding this opinion, which holds that, in this particular context, the required mental state of "knowing" is belied by a good faith belief in the legality of one's conduct. The Court makes clear: That's not always the case, by any means. But it unanimously holds that it's true here.
Justice Kruger's discussion three-quarters of the way through the opinion is probably as good as one can get on this issue. It's fuzzy. It depends on context. But, here, the Legislature probably didn't intend to penalize employers for good faith mistakes -- including but not limited to good faith mistakes regarding legality -- for errors made on a wage statement. You can still sue for injunctive relief and fees. But not statutory penalties. Sorry about that, but that's the best way we can harmonize the statute as a whole.
But as for the larger epistemological question of what it means to "know" something: well, for better or worse, we're going to have to leave that one for the philosophy crowd.
Good luck with that.