Consistency ensures that a transaction can only bring the database from one consistent state to another. Any data written to the database must be valid according to all defined rules, including constraints, cascades, triggers, and any combination thereof. This prevents database corruption by an illegal transaction.

In short:

The transaction has a correct transformation of the state. The actions taken as a group do not violate any of the integrity constraints associated with the state.