1.0.0 • Published 6 months ago

openui5-password v1.0.0

Weekly downloads
15
License
MIT
Repository
github
Last release
6 months ago

openui5-password

npm test

An OpenUI5 Control which checks password strength and validates it against pre-defined rules. The control is an input with password type and parameters to enable validation rules.

Demo

You can check out a live demo here:

https://mauriciolauffer.github.io/openui5-password/demo/webapp/index.html

Demo Screenshot

Project Structure

  • demo - Library's live demo
  • dist - Distribution folder which contains the library ready to use
  • src - Development folder
  • test - Testing framework for the library

Getting started

Installation

Install openui5-password as an npm module

$ npm install openui5-password

Configure manifest.json

Add the library to sap.ui5/dependencies/libs and set its path in sap.ui5/resourceRoots in your manifest.json file, as follows:

{
  "sap.ui5": {
    "dependencies": {
      "libs": {
        "openui5.password": {}
      }
    },
    "resourceRoots": {
      "openui5.password": "./FOLDER_WHERE_YOU_PLACED_THE_LIBRARY/openui5/password/"
    }
  }
}

How to use

Import openui5-password to your UI5 controller using sap.ui.require:

sap.ui.require([
  'openui5/password/Password'
], function (Password) {
  const passwordInput = new Password({
    requireNumbers: true,
    requireLetters: true,
    requireSymbols: true,
    requireLowercase: true,
    requireUppercase: true,
    minLength: 5,
    maxLength: 42
  });
});

Config Parameters

NameTypeDefaultDescription
maxLengthinteger0Maximum number of characters. Value '0' means the feature is switched off.
minLengthinteger0Minimum number of characters. Value '0' means the feature is switched off.
requireNumbersbooleantrueIndicates that input must contain numbers
requireSymbolsbooleantrueIndicates that input must contain symbols
requireLettersbooleantrueIndicates that input must contain letters
requireLowercasebooleantrueIndicates that input must contain lowercase letters
requireUppercasebooleantrueIndicates that input must contain uppercase letters
scoreinteger0The score is a number which indicates the password strength.

Author

Mauricio Lauffer

License

This project is licensed under the MIT License - see the LICENSE file for details

1.0.0

6 months ago

0.1.14

3 years ago

0.1.13

4 years ago

0.1.12

4 years ago

0.1.11

4 years ago

0.1.10

4 years ago

0.1.9

5 years ago

0.1.8

5 years ago

0.1.7

5 years ago

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago

0.0.3

7 years ago

0.0.2

7 years ago