diff --git a/.gitignore b/.gitignore index e4f2245..6b1868c 100644 --- a/.gitignore +++ b/.gitignore @@ -29,3 +29,10 @@ yarn-error.log* .DS_Store Thumbs.db .idea/ + +# ── Migrations ───────────────────────────────────────────────────────── +# New EF Core migrations are not committed. Note the 4 migrations already in +# Backend/ERPCore/Infra/Persistence/Migrations/ stay tracked — .gitignore does +# not apply to tracked files — so edits to those still get committed as normal. +# Untracking them too takes `git rm --cached`. +**/Migrations/ diff --git a/Frontend/erp-system/lib/validations.ts b/Frontend/erp-system/lib/validations.ts index bef2e60..ad0e173 100644 --- a/Frontend/erp-system/lib/validations.ts +++ b/Frontend/erp-system/lib/validations.ts @@ -15,18 +15,10 @@ export const emailSchema = z.string().min(1, "Email is required").email("Enter a // Login schema (email + password) for reuse across the app export const loginSchema = z.object({ email: emailSchema, - password: requiredString("Password is required") - .refine((val) => val.length >= 8, { message: "Password must be at least 8 characters" }) - .refine((val) => /[A-Z]/.test(val), { - message: "Password must contain at least one uppercase letter", - }) - .refine((val) => /[a-z]/.test(val), { - message: "Password must contain at least one lowercase letter", - }) - .refine((val) => /[0-9]/.test(val), { message: "Password must contain at least one number" }) - .refine((val) => /[!@#$%^&*(),.?":{}|<>\[\]\\/`~;'+=-]/.test(val), { - message: "Password must contain at least one special character", - }), + // Login only checks that a password was typed — complexity rules belong to + // signup/reset. Enforcing them here just leaks the policy and blocks users + // whose existing password predates it; the server decides what's valid. + password: requiredString("Password is required"), }) export type LoginValues = z.infer