1.0.2 • Published 6 years ago

simple-password-validator v1.0.2

Weekly downloads
6
License
MIT
Repository
github
Last release
6 years ago

simple-password-validator

Build Status

Simple password validator module to AngularJs.

We have 2 directives in this package:

  • app-password-match
  • app-password-validator

How to use

Import the simple-password-validator module:

import passwordValidator from 'simple-password-validator';

angular.module('myModule', [
    passwordValidator
]);

Use in the inputs tags:

<input name="password" app-password-validator type="password" ng-model="vm.user.password" minlength="8" maxlength="30" required>

<input type="password" name="matchPassword" app-password-match password="vm.user.password" ng-model="vm.user.matchPassword" maxlength="30" required>

app-password-match

This directive can be aplied to the match password. It receives a parameter called password to verify if it matches to the ng-model.

app-password-validator

The default validator regex is able to validate the fallowing rules:

  • 1 uppercase character
  • 1 lowercase character
  • 1 digit

It's possible to pass the password-regex param, in order to specify a new regex rule to the password validar.

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago

0.0.8

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago