Validate edata argument of raise_exception_if method.

def _validate_edata(self, edata):
        """Validate edata argument of raise_exception_if method."""
        # pylint: disable=R0916
        if edata is None:
            return True
        if not (isinstance(edata, dict) or _isiterable(edata)):
            return False
        edata = [edata] if isinstance(edata, dict) else edata
        for edict in edata:
            if (not isinstance(edict, dict)) or (
                isinstance(edict, dict)
                and (
                    ("field" not in edict)
                    or ("field" in edict and (not isinstance(edict["field"], str)))
                    or ("value" not in edict)
                )
            ):
                return False
        return True