# Function validateEvaluationCriterion

- validateEvaluationCriterion(
  criterion: unknown,
  ): ZodSafeParseResult<
  {
  id: string;
  name: string;
  description: string;
  type: "binary"
  | "threshold"
  | "scaled"
  | "categorical";
  weight: number;
  passThreshold?: number;
  categories?: readonly string[];
  },
  >

  Validate an evaluation criterion definition.

  #### Parameters

  - criterion: unknown

    Criterion to validate

  #### Returns ZodSafeParseResult<
  {
  id: string;
  name: string;
  description: string;
  type: "binary"
  | "threshold"
  | "scaled"
  | "categorical";
  weight: number;
  passThreshold?: number;
  categories?: readonly string[];
  },
  >

  Validation result with inferred schema type

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