onValidationFail is an attribute you can specify in changesets in your changelog. It controls what Liquibase does when a changeset fails validation. Values are HALT and MARK_RAN. Default: HALT.

onValidationFail does not relate to checksum validation. This attribute is only valid for XML, JSON, and YAML changesets because Liquibase does not validate the SQL within SQL changesets before it is executed.


Liquibase performs basic validation on changesets you deploy, such as checking whether a change is valid for your database or whether you have specified all required attributes. If a changeset fails this validation, by default Liquibase halts the deployment and return an error message. For example:

Unexpected error running Liquibase: Error parsing line 40 column 65 of example-changelog.xml: cvc-complex-type.4: Attribute 'id' must appear on element 'changeSet'.

However, you can set onValidationFail to MARK_RAN if you want Liquibase to mark a failing changeset as run and continue with the deployment.

Tip: If your changesets are failing validation and you want a deployment to proceed, it is a best practice to fix the underlying cause of the failures instead of skipping them with onValidationFail.


Note: All changelog attributes use the camelCase format.

Related links