<!--
{
  "availability" : [
    "macOS: 12.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSTextLayoutManager/renderingAttributesValidator",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSTextLayoutManager(py)renderingAttributesValidator"
  },
  "title" : "renderingAttributesValidator"
}
-->

# renderingAttributesValidator

A callback block that the framework invokes whenever the text layout manager needs to validate the rendering attributes for the range.

```
var renderingAttributesValidator: ((NSTextLayoutManager, NSTextLayoutFragment) -> Void)? { get set }
```

## Discussion

The validator uses [`setRenderingAttributes(_:for:)`](/documentation/AppKit/NSTextLayoutManager/setRenderingAttributes(_:for:)) to fill the rendering attributes appropriate for the range inside `textLayoutFragment`.

---

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)