Last active
August 29, 2015 14:14
-
-
Save dejanvasic85/3c6391fdca6e45d2fcc4 to your computer and use it in GitHub Desktop.
Angular Password Strength Indicator
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div ng-app="passwordModule" ng-controller="credentialsController" class="container"> | |
<form name="form"> | |
<div class="form-group"> | |
<label for="password">Password</label> | |
<input type="text" name="password" id="password" ng-model="credentials.password" ng-model-options="{allowInvalid: true}" pattern-validator="((?=.*\d)(?=.*[A-Z])(?=.*\W).{8,8})" class="form-control" /> | |
</div> | |
<div class="form-group"> | |
<label>Password Strength</label> | |
<password-strength ng-model="credentials.password"></password-strength> | |
</div> | |
<div class="alert alert-error" ng-show="form.password.$error.passwordPattern">The password does not meet requirements!</div> | |
</form> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment