# j-PasswordMeter

> This component evaluates password according to the rating. Rating is counted as a percentage: 100% = Strong, 50% = Good, 0% = Weak.

Framework: jcomponent20
Product: jComponent 20 (jcomponent@20)
Language: en
Content-SHA256: 7ab771cae19b0f95e46f6f02f065c4fc86106277c99458332d5229ead3412936
Snapshot: c0700e321579725c5cf4f5ace1ad7d2866d1b4f93c24a63c0b41b6b7998e976c
Sources: components@910ed1a86f6e72b4f031d3ad0dc7844f9fc5cb8e
Review: not-recorded

__Configuration__:

- `numbers {Boolean}` password must contain min. 1 numbers (default: `true`)
- `chars {Boolean}` password must contain min. 1 chars (default: `true`)
- `special {Boolean}` password must contain min. 1 special char (default: `false`)
- `min {Number}` password must have min. length of characters (default: `4`)
- `casesensitive {Boolean}` password must contain min. 1 lower and upper char (default: `true`)
- `weak {String}` a label for weak password (default: `Weak`)
- `good {String}` a label for good password (default: `Good`)
- `strong {String}` a label for strong password (default: `Strong`)
- `short {String}` a label for short password (default: `Short password`)
- `text {String}` a label for label (default: `Password strength`)
- `valid {Number}` min. valid criteria in percentage (default: `40`)
- __NEW__ `showprogress {Boolean}` shows a progress bar (default: `true`)
- __NEW__ `progress {String}` a path to `function({ progress: Number, rating: Number, numbers: Number, chars: Number, special: Number, upper: Number, lower: Number, unicode: Number, points: Number })`

__Good to know__:
This component evaluates password according to the rating. Rating is counted as a percentage: `100%` = Strong, `50%` = Good, `0%` = Weak.

- `weak` rating is lower than `30`
- `good` rating is between `30` and `70`
- `strong` rating is greater than `70`

Use it with `<ui-component name="passwordmeter">`. When the component is not loaded yet, jComponent downloads it on first use from the address in `DEF.fallback` (the Componentator CDN by default). Author: Peter Širka. Source: the Componentator components repository, MIT license.

```html example.html
<div style="width:300px">
	<ui-component name="passwordmeter" path="mypassword1"></ui-component>
	<br />
	<ui-component name="passwordmeter" path="mypassword2"></ui-component>
	<br />
	<ui-component name="passwordmeter" path="mypassword3"></ui-component>
</div>

<script>
	var mypassword1 = '123456';
	var mypassword2 = 'abcd';
	var mypassword3 = 'Ad35*t84';
</script>
```
