def validate(self):
        """Validate the configuration against its contract.

        :raises DbtProjectError: If the configuration fails validation.
        """
        try:
            Configuration.validate(self.serialize())
        except ValidationError as e:
            raise ConfigContractBrokenError(e) from e
Validate the configuration against its contract.

        :raises DbtProjectError: If the configuration fails validation.
        
core/dbt/config/runtime.py