def iter_list(self) -> Iterator[Result]:
        """Iterate over a ``data`` object and perform validations using the first element of the ``validator``.

        :yields: objects with the error message related to the failure, if any check fails.
        """
        data = cast(List[Any], self.data)
        if len(data) == 0:
            yield Result(False, "is an empty list", data=data)

        validators = cast(List[Any], self.validator)
        if len(validators):
            for key, value in enumerate(data):
                # Although the value in the configuration (`data`) is expected to contain 1 or more entries, only
                # the first validator defined in `validator` property list will be used. It is only defined as a
                # `list` in `validator` so this logic can understand that the value in `data` attribute should be a
                # `list`. For example: "pg_hba": [str] in `validator` attribute defines that "pg_hba" in `data`
                # attribute should contain a list with one or more `str` entries.
                for v in Schema(validators[0]).validate(value):
                    yield Result(v.status, v.error,
                                 path=(str(key) + ("." + v.path if v.path else "")), level=v.level, data=value)
Iterate over a ``data`` object and perform validations using the first element of the ``validator``.

        :yields: objects with the error message related to the failure, if any check fails.
        
patroni/validator.py