@parra/ios-password-rules-descriptor

0.2.1 • Public • Published

UITextInputPasswordRules Descriptor Generator

A simple utility for generating the descriptor to initialize a UITextInputPasswordRules object per Apple's Customizing Password AutoFill rules documentation.

Installation

Run npm install @parra/ios-password-rules-descriptor

Usage

const generatePasswordRulesDescriptor = require("@parra/ios-password-rules-descriptor")

const rules = [
  { required: 'upper' },
  { required: 'lower' },
  { required: 'digit' },
  { allowed: '[-().&@?\'#,/"+]' },
  { maxConsecutive: 2 },
  { minLength: 8 }
];

const descriptor = generatePasswordRulesDescriptor(rules);

Readme

Keywords

none

Package Sidebar

Install

npm i @parra/ios-password-rules-descriptor

Weekly Downloads

2

Version

0.2.1

License

ISC

Unpacked Size

4.87 kB

Total Files

5

Last publish

Collaborators

  • imaccallum