@@ -1,15 +1,23 @@
|
||||
<script context="module">
|
||||
import { passwordStrength } from "check-password-strength";
|
||||
export function password_strong_enough(password_change) {
|
||||
let strength = passwordStrength(password_change);
|
||||
return (strength?.contains.includes("lowercase") &&
|
||||
strength?.contains.includes("uppercase") &&
|
||||
strength?.contains.includes("number") &&
|
||||
strength?.length > 9);
|
||||
}
|
||||
export function password_strong_enough_and_equal(password_change, password_confirm){
|
||||
return password_strong_enough(password_change) && password_change === password_confirm;
|
||||
}
|
||||
import { passwordStrength } from "check-password-strength";
|
||||
export function password_strong_enough(password_change) {
|
||||
let strength = passwordStrength(password_change);
|
||||
return (
|
||||
strength?.contains.includes("lowercase") &&
|
||||
strength?.contains.includes("uppercase") &&
|
||||
strength?.contains.includes("number") &&
|
||||
strength?.length > 9
|
||||
);
|
||||
}
|
||||
export function password_strong_enough_and_equal(
|
||||
password_change,
|
||||
password_confirm
|
||||
) {
|
||||
return (
|
||||
password_strong_enough(password_change) &&
|
||||
password_change === password_confirm
|
||||
);
|
||||
}
|
||||
</script>
|
||||
|
||||
<script>
|
||||
|
||||
Reference in New Issue
Block a user