1.2.5 • Published 7 years ago

ovh-ng-input-password v1.2.5

Weekly downloads
139
License
BSD-3-Clause
Repository
github
Last release
7 years ago

Maintenance Chat on gitter Build Status

NPM githubbanner

Input Password

Installation

Before using it, you have to install it with bower cli :

bower install ovh-ng-input-password --save

Get the sources

$ git clone https://github.com/ovh-ux/ovh-angular-input-password.git
$ cd ovh-ng-input-password
$ npm install
$ bower install

How to use?

angular.module("yourModule", [
    "inputPassword"
])
.controller("mainCtrl", function(scope) {
    this.rules = [
        {
            id: "length",
            caption: "Must contain 8 to 20 characters",
            validator: function (str) {
                return str && str.length > 7 && str.length < 21;
            }
        },
        {
            id: "specialChar",
            caption: "Can contain following characters #{}()[]-|@=*+/!:;",
            validator: /^[\w~"#'\{\}\(\\)[\]\-\|\\^@=\*\+\/!:;.,?<>%*µÀÁÂÃÄÅàáâãäåÒÓÔÕÖØòóôõöøÈÉÊËèéêëÇçÌÍÎÏìíîïÙÚÛÜùúûüÿÑñ]+$/,
            immediateWarning: true
        },
    ];
    this.getStrength = function(val) {
        return (val.length-8) / 12;
    }
});
<input-password data-ng-model="mainCtrl.password"
                name="password"
                data-strength="mainCtrl.getStrength(value)"
                data-rules="mainCtrl.rules">
</input-password>

Docs

You can show the generated documentation using the command below in a command prompt:

grunt ngdocs && grunt connect

Then open a browser and go to http://localhost:8000/docs/.

Unit Tests

You can unitary test by executing in a command prompt:

grunt test

Contributing

You've developed a new cool feature ? Fixed an annoying bug ? We'd be happy to hear from you !

Have a look in CONTRIBUTING.md

Related links

License

See https://github.com/ovh-ux/ovh-ng-input-password/blob/master/LICENSE

1.2.5

7 years ago

1.2.4

7 years ago

1.2.3

7 years ago

1.2.2

7 years ago

1.2.1

7 years ago