Validate the configuration against its contract.

        :raises DbtProjectError: If the configuration fails validation.

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

        :raises DbtProjectError: If the configuration fails validation.
        """
        try:
            Configuration(**self.serialize())
        except ValidationException as e:
            raise DbtProjectError(str(e))

        if getattr(self.args, 'version_check', False):
            self.validate_version()