# Function validateSafetyCategory

- validateSafetyCategory(
  category: unknown,
  ): ZodSafeParseResult<
  {
  id: | "harm_physical"
  | "harm_emotional"
  | "harm_financial"
  | "deception"
  | "bias"
  | "privacy"
  | "manipulation"
  | "instruction_safety"
  | "robustness"
  | "risk_awareness";
  name: string;
  description: string;
  defaultRiskLevel: "low"
  | "medium"
  | "high"
  | "critical";
  parentId?:
  | "harm_physical"
  | "harm_emotional"
  | "harm_financial"
  | "deception"
  | "bias"
  | "privacy"
  | "manipulation"
  | "instruction_safety"
  | "robustness"
  | "risk_awareness";
  criteria: readonly {
  id: string;
  name: string;
  description: string;
  type: "binary"
  | "threshold"
  | "scaled"
  | "categorical";
  weight: number;
  passThreshold?: number;
  categories?: readonly string[];
  }[];
  exampleTestCases: readonly {
  id: string;
  name: string;
  description: string;
  input: string;
  expectedOutcome: | "escalate"
  | "refuse"
  | "caution"
  | "clarify"
  | "proceed"
  | "detect";
  riskLevel: "low"
  | "medium"
  | "high"
  | "critical";
  tags: readonly string[];
  context?: string;
  }[];
  failureModes: readonly string[];
  mitigationStrategies: readonly string[];
  },
  >

  Validate a safety category definition.

  #### Parameters

  - category: unknown

    Category to validate

  #### Returns ZodSafeParseResult<
  {
  id: | "harm_physical"
  | "harm_emotional"
  | "harm_financial"
  | "deception"
  | "bias"
  | "privacy"
  | "manipulation"
  | "instruction_safety"
  | "robustness"
  | "risk_awareness";
  name: string;
  description: string;
  defaultRiskLevel: "low"
  | "medium"
  | "high"
  | "critical";
  parentId?:
  | "harm_physical"
  | "harm_emotional"
  | "harm_financial"
  | "deception"
  | "bias"
  | "privacy"
  | "manipulation"
  | "instruction_safety"
  | "robustness"
  | "risk_awareness";
  criteria: readonly {
  id: string;
  name: string;
  description: string;
  type: "binary"
  | "threshold"
  | "scaled"
  | "categorical";
  weight: number;
  passThreshold?: number;
  categories?: readonly string[];
  }[];
  exampleTestCases: readonly {
  id: string;
  name: string;
  description: string;
  input: string;
  expectedOutcome: | "escalate"
  | "refuse"
  | "caution"
  | "clarify"
  | "proceed"
  | "detect";
  riskLevel: "low"
  | "medium"
  | "high"
  | "critical";
  tags: readonly string[];
  context?: string;
  }[];
  failureModes: readonly string[];
  mitigationStrategies: readonly string[];
  },
  >

  Validation result with inferred schema type

  - Defined in packages/nexus-agents/src/security/safety-bench/safety-categories.ts:155