class_docstr: Validation results for a dataframe.
  
  Attributes:
      passed: Whether the validation passed or not.
      errors: List of errors if the validation failed.
class_docstr_tok: ["Validation","results","for","a","dataframe",".","Attributes",":","passed",":","Whether","the","validation","passed","or","not",".","errors",":","List","of","errors","if","the","validation","failed","."]
docstr: Add an error message to the validation results.
  
  Args:
      error_message: Error message to add.
docstr_tok: ["Add","an","error","message","to","the","validation","results",".","Args",":","error_message",":","Error","message","to","add","."]
code: def add_error(self, error_message: str):
      """
      Add an error message to the validation results.
  
      Args:
          error_message: Error message to add.
      """
      self._passed = False
      self._errors.append(error_message)
  
file_path: pandas-ai/pandasai/helpers/df_validator.py
imports: from typing import List, Dict
  from pydantic import ValidationError
  from pydantic import BaseModel
  from pandasai.helpers.df_info import DataFrameType, df_type
label_desc: Use image node_id 4 for calling the DfValidationResult obj's underlying member method code with example usage: obj.add_error(error_message) without return types