<!--
{
  "availability" : [
    "iOS: 17.4.0 -",
    "iPadOS: 17.4.0 -",
    "macCatalyst: 17.4.0 -",
    "macOS: 14.4.0 -",
    "tvOS: 17.4.0 -",
    "visionOS: 1.1.0 -",
    "watchOS: 10.4.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "LightweightCodeRequirements",
  "identifier" : "/documentation/LightweightCodeRequirements/ValidationCategory",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "LightweightCodeRequirements"
    ],
    "preciseIdentifier" : "s:27LightweightCodeRequirements18ValidationCategoryV"
  },
  "title" : "ValidationCategory"
}
-->

# ValidationCategory

A constraint that tests whether a code file or running process is signed in a way that conforms to the specified validation category.

```
struct ValidationCategory
```

## Overview

Validation categories are an indication of the type of signature on the file and how it is allowed to run.

## Topics

### Structures

[`struct Value`](/documentation/LightweightCodeRequirements/ValidationCategory/Value)

Supported Validation categories for signatures

### Initializers

[`init(ValidationCategory.Value)`](/documentation/LightweightCodeRequirements/ValidationCategory/init(_:))

Matches if the file or process is signed in a way that conforms to the specified category.

[`init(from: any Decoder) throws`](/documentation/LightweightCodeRequirements/ValidationCategory/init(from:))

Create a new instance by decoding from the given decoder

### Instance Methods

[`func encode(to: any Encoder) throws`](/documentation/LightweightCodeRequirements/ValidationCategory/encode(to:))

Encodes this value into the given encoder

### Type Aliases

[`typealias DataType`](/documentation/LightweightCodeRequirements/ValidationCategory/DataType)

The basic input data type for this constraint: `ValidationCategoryType`.

[`typealias OutType`](/documentation/LightweightCodeRequirements/ValidationCategory/OutType)

The type of this constraint: [`ValidationCategory`](/documentation/LightweightCodeRequirements/ValidationCategory).

### Type Methods

[`static func `in`([ValidationCategory.DataType]) -> ValidationCategory.OutType`](/documentation/LightweightCodeRequirements/ValidationCategory/in(_:)-1skt4)

Matches if the file or process is signed in a way that conforms to any of the specified categories.

[`static func `in`(ValidationCategory.DataType...) -> ValidationCategory.OutType`](/documentation/LightweightCodeRequirements/ValidationCategory/in(_:)-94p2z)

Matches if the file or process is signed in a way that conforms to any of the specified categories.

## Relationships

### Conforms To

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Sendable`](/documentation/Swift/Sendable)

[`ProcessConstraint`](/documentation/LightweightCodeRequirements/ProcessConstraint)

[`Encodable`](/documentation/Swift/Encodable)

[`LaunchConstraint`](/documentation/LightweightCodeRequirements/LaunchConstraint)

[`OnDiskConstraint`](/documentation/LightweightCodeRequirements/OnDiskConstraint)

[`Decodable`](/documentation/Swift/Decodable)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)