This commit is contained in:
2025-11-04 14:45:52 +01:00
parent 02a2333a41
commit d436318bdb
3 changed files with 9 additions and 10 deletions
+4 -7
View File
@@ -28,10 +28,7 @@ const CreatePassword = () => {
const [loading, setLoading] = useState(false);
const [, setTooltip] = useGlobal("_tooltip");
const passwordRegex = useMemo(
() => /^(?=.*[a-z])(?=.*[A-Z])(?=.*[^A-Za-z0-9]).{8,}$/,
[]
);
const passwordRegex = useMemo(() => /^.{6,}$/, []);
const handlePasswordChange = (text) => {
setPassword(text);
@@ -42,7 +39,7 @@ const CreatePassword = () => {
if (!passwordRegex.test(text)) {
setPasswordError(
"Ton mot de passe doit contenir 8 caractères, une majuscule, une minuscule et un caractère spécial."
"Ton mot de passe doit contenir au moins 6 caractères."
);
} else {
setPasswordError("");
@@ -55,7 +52,7 @@ const CreatePassword = () => {
try {
if (!isPasswordValid) {
setTooltip({
text: "Ton mot de passe doit contenir 8 caractères, une majuscule, une minuscule et un caractère spécial.",
text: "Ton mot de passe doit contenir au moins 6 caractères.",
type: "error",
});
return;
@@ -128,7 +125,7 @@ const CreatePassword = () => {
fontFamily: FONT_FAMILY.InterRegular,
}}
>
Utilise au moins 8 caractères pour sécuriser ton compte.
Utilise au moins 6 caractères pour sécuriser ton compte.
</Text>
</View>
<Input