Skip to content

Commit

Permalink
fix(validation): use correct field
Browse files Browse the repository at this point in the history
  • Loading branch information
MaximBalaganskiy committed Sep 23, 2019
1 parent 30aefd6 commit 50997e8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/validation/validation-rules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ FluentRules.prototype.password = function(r: IPasswordRequirements) {
result = result ? result.satisfiesRule("requireNonAlphanumeric") : this.satisfiesRule("requireNonAlphanumeric");
}
if (r.requiredUniqueChars) {
result = result ? result.satisfiesRule("requiredUniqueChars", r.requiredLength) : this.satisfiesRule("requiredUniqueChars", r.requiredLength);
result = result ? result.satisfiesRule("requiredUniqueChars", r.requiredUniqueChars) : this.satisfiesRule("requiredUniqueChars", r.requiredUniqueChars);
}
if (!result) {
throw new Error("Password requirements are not set");
Expand All @@ -114,7 +114,7 @@ FluentRuleCustomizer.prototype.password = function(r: IPasswordRequirements) {
result = result.satisfiesRule("requireNonAlphanumeric");
}
if (r.requiredUniqueChars) {
result = result.satisfiesRule("requiredUniqueChars", r.requiredLength);
result = result.satisfiesRule("requiredUniqueChars", r.requiredUniqueChars);
}
if (!result) {
throw new Error("Password requirements are not set");
Expand Down

0 comments on commit 50997e8

Please sign in to comment.