
Research
Security News
The Landscape of Malicious Open Source Packages: 2025 Mid‑Year Threat Report
A look at the top trends in how threat actors are weaponizing open source packages to deliver malware and persist across the software supply chain.
angular-trustpass
Advanced tools
A simple password strength meter and validator inspired by MailChimp's signup form.
The trusty password security checklist.
This is a simple password strength meter & validator inspired by MailChimp's signup form.
Done by folks at Trustroots.org
You can install this package either with npm
or with bower
.
npm install angular-trustpass --save
Then add trTrustpass
as a dependency for your app:
angular.module('demoApp', ['trTrustpass']);
bower install angular-trustpass --save
Add <script>
and <link>
to your page:
<link rel="stylesheet" href="bower_modules/angular-trustpass/dist/tr-trustpass.css">
<script src="bower_modules/angular-trustpass/dist/tr-trustpass.js"></script>
Then add trTrustpass
as a dependency for your app:
angular.module('demoApp', ['trTrustpass']);
<input type="password" tr-trustpass>
<input type="password" tr-trustpass="{special: false}" ng-minlength="9">
<form name="demo">
<div class="form-group" ng-class="{'has-error': demoForm.password.$invalid && demoForm.password.$dirty,
'has-success': !demoForm.password.$invalid && demoForm.password.$dirty}">
<label for="password">Password</label>
<input id="password"
class="form-control"
type="password"
name="password"
placeholder="Password"
tr-trustpass="{maximum: true, special: false, messageGuide: 'Make sure your password meets these requirements:'}"
ng-minlength="9"
ng-maxlength="90"
ng-model="password">
</div>
<button type="submit" ng-disabled="demo.password.$invalid" class="btn btn-primary">Sign in</button>
</form>
Password model will have $invalid
set true and $error.trustpass
set true when any of the tests fail. You can then style your form or input with Angular validation classes.
Pass a json object to tr-trustpass
like this: tr-trustpass="{maximum: true, special: false}"
Option | Default | Description |
---|---|---|
lowercase | true | Find a-z |
uppercase | true | Find A-Z |
number | true | Find 0-9 |
special | true | Find a non-word character or the _ (underscore) character |
minimum | true | Check minimum length. Defaults to 8 but you can set it with ng-minlength or minlength attributes, or maxlength option. |
maximum | false | Check maximum length. Defaults to 50 but you can set it with ng-maxlength or maxlength attributes, or maxlength option). |
word | false | Find a word character. |
"A word character" is a character from a-z, A-Z, 0-9, including the _ (underscore) character.
Option | Default | Description |
---|---|---|
toggle | false | Should checklist be visible only on focus? |
keepHeight | false | Should dropdown area keep its initially rendered height? |
minlength | 8 | Minimum length of the password, if minimum test is enabled (on by default). |
maxlength | 50 | Maximum length of the password, if maximum test is enabled (off by default). |
Option | Default | Description |
---|---|---|
messageDone | Great! Your password is secure. | A message shown after all tests pass. |
messageGuide | A message on top of checklist. Leave empty to hide. | |
lowercaseLabel | One lowercase character | Label for the lowercase test |
uppercaseLabel | One uppercase character | Label for the uppercase test |
numberLabel | One number | Label for the number test |
specialLabel | One special character | Label for the special test |
minimumLabel | characters minimum | Label for the minimum test. The ng-minlength value will be prepend to the label (f.i.: 8 characters minimum) |
maximumLabel | characters maximum | Label for the maximum test. The ng-maxlength value will be prepend to the label (f.i.: 8 characters maximum) |
wordLabel | Alphanumeric characters | Label for the word test |
Ideas and pull requests totally welcome!
npm install
gulp
gulp demo
...and open http://localhost:3000/ to your browser.
0.4.0 (2016-09-02)
ngModel
not being set empty when surrounding form is reset. Thanks to @romelgomez for reporting.<a name"0.3.0"></a>
FAQs
A simple password strength meter and validator inspired by MailChimp's signup form.
The npm package angular-trustpass receives a total of 2 weekly downloads. As such, angular-trustpass popularity was classified as not popular.
We found that angular-trustpass demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A look at the top trends in how threat actors are weaponizing open source packages to deliver malware and persist across the software supply chain.
Security News
ESLint now supports HTML linting with 48 new rules, expanding its language plugin system to cover more of the modern web development stack.
Security News
CISA is discontinuing official RSS support for KEV and cybersecurity alerts, shifting updates to email and social media, disrupting automation workflows.