<!--
{
  "availability" : [
    "iOS: 12.0.0 -",
    "iPadOS: 12.0.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: 12.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UITextInputPasswordRules",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UITextInputPasswordRules"
  },
  "title" : "UITextInputPasswordRules"
}
-->

# UITextInputPasswordRules

A class that represents password rules for a text input field.

```
@MainActor class UITextInputPasswordRules
```

## Topics

### Creating password rules

[`init(descriptor:)`](/documentation/UIKit/UITextInputPasswordRules/init(descriptor:))

Initializes a password rules object with a descriptor.

### Getting the rules

[`passwordRulesDescriptor`](/documentation/UIKit/UITextInputPasswordRules/passwordRulesDescriptor)

A string representing a set of password rules.



---

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)