small difference

This commit is contained in:
2024-02-03 00:39:27 +01:00
parent c135e4e98a
commit daff03e5f3
9 changed files with 151 additions and 4 deletions
+26
View File
@@ -0,0 +1,26 @@
export default class PassPolicy {
private options;
constructor(options: {
minLength: number;
maxLength: number;
minLower: number;
minUpper: number;
minNum: number;
minSpecial: number;
specialChars: string;
});
validate(password: string): {
valid: boolean;
message: string;
} | {
valid: boolean;
message?: undefined;
};
CheckDifference(newPassword: string, oldPassword: string, neededDifference?: number): {
valid: boolean;
message: string;
} | {
valid: boolean;
message?: undefined;
};
}