Skip to content

Commit

Permalink
fix(package): improved validate function in the validator class #143 #…
Browse files Browse the repository at this point in the history
  • Loading branch information
AnthonyNahas committed Apr 18, 2019
1 parent d6ae437 commit 0191024
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/module/validator/mat-password-strength-validator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,12 @@ export class MatPasswordStrengthValidator {
const validator = (control: AbstractControl): { [key: string]: any } => {
this.isUndefinedOrEmpty(control);
if (!regex.test(control.value)) {
return {
key: true
}
const failed = {};
failed[criteria] = {
actualValue: control.value,
requiredPattern: regex
};
return failed;
}
return undefined;
};
Expand Down

0 comments on commit 0191024

Please sign in to comment.