def validate()

in src/stepfunctions/inputs/placeholders.py [0:0]


    def validate(self, input):
        """
        Validate a specified input against the placeholder collection schema.

        Args:
            input (dict): Input to validate against the placeholder collection schema.

        Returns:
            ValidationResult: Named tuple with the keys:
                                `valid` (Boolean): Representing the result of validation ,
                                `keys_missing` (list(str)): List of keys missing in the input ,
                                `keys_type_mismatch` (list(str), type, type): List of tuples with key name, expected type, and provided type.
        """
        if input is None:
            return False, None, None
        flattened_schema = flatten(self.get_schema_as_dict())
        flattened_input = flatten(input)
        keys_missing = [i for i in flattened_schema if i not in flattened_input]
        keys_type_mismatch = []
        for k, v in flattened_input.items():
            if k in flattened_schema and not isinstance(v, flattened_schema.get(k)):
                keys_type_mismatch.append((k, flattened_schema.get(k), type(v)))
        if len(keys_missing) > 0 or len(keys_type_mismatch) > 0:
            valid = False
        else:
            valid = True
        return ValidationResult(valid=valid, keys_missing=keys_missing, keys_type_mismatch=keys_type_mismatch)