Skip to content

A simple utility to generate a UITextInputPasswordRules descriptor

License

Notifications You must be signed in to change notification settings

Parra-Inc/ios-password-rules-descriptor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UITextInputPasswordRules Descriptor Generator

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

Maintained by Parra

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 },
  { maxLength: 128 }
];

const descriptor = generatePasswordRulesDescriptor(rules);

// required: upper, lower, digit; allowed: [-().&@?\'#,/"+]; max-consecutive: 2; minlength: 8; maxlength: 128;

About

A simple utility to generate a UITextInputPasswordRules descriptor

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published