eventIndex property

int? get eventIndex

Obtiene el índice del evento en el array si el error es sobre un evento específico Los errores de Pydantic tienen formato: "body", index, "field"

Implementation

int? get eventIndex {
  if (loc.length >= 2 && loc[0] == "body" && loc[1] is int) {
    return loc[1] as int;
  }
  return null;
}