"use client"; import { SuccessIcon } from "@/app/utils/svgs/passwordIcons/successIcon"; import { ErrorIcon } from "@/app/utils/svgs/passwordIcons/errorIcon"; import { DotListIcon } from "@/app/utils/svgs/account/myAccount/listDotIcon"; export const PasswordRules = ({ value }: { value: string }) => { const rules = [ { label: "At least 8 characters long", test: (val: string) => val.length >= 8, }, { label: "At least 1 uppercase letter (A-Z)", test: (val: string) => /[A-Z]/.test(val), }, { label: "At least 1 lowercase letter (a-z)", test: (val: string) => /[a-z]/.test(val), }, { label: "At least 1 number (0-9)", test: (val: string) => /\d/.test(val), }, { label: "At least 1 special character", test: (val: string) => /[^A-Za-z0-9]/.test(val), }, ]; return (
); };