model_validate
- classmethod PreProcessor.model_validate(obj: Any, *, strict: bool | None = None, from_attributes: bool | None = None, context: dict[str, Any] | None = None) Model
Validate a pydantic model instance.
- Args:
obj: The object to validate. strict: Whether to raise an exception on invalid fields. from_attributes: Whether to extract data from object attributes. context: Additional context to pass to the validator.
- Raises:
ValidationError: If the object could not be validated.
- Returns:
The validated model instance.