From 127287f2f6e843bbe4a02f24dbba55898e92aaab Mon Sep 17 00:00:00 2001 From: SphericalKat Date: Wed, 11 Aug 2021 13:35:35 +0530 Subject: [PATCH] refactor(user): reduce password length limit to 8 characters Signed-off-by: SphericalKat --- lib/ketbin/accounts/user.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ketbin/accounts/user.ex b/lib/ketbin/accounts/user.ex index 7748c97..f0b3470 100644 --- a/lib/ketbin/accounts/user.ex +++ b/lib/ketbin/accounts/user.ex @@ -48,7 +48,7 @@ defmodule Ketbin.Accounts.User do defp validate_password(changeset, opts) do changeset |> validate_required([:password]) - |> validate_length(:password, min: 12, max: 80) + |> validate_length(:password, min: 8, max: 80) # |> validate_format(:password, ~r/[a-z]/, message: "at least one lower case character") # |> validate_format(:password, ~r/[A-Z]/, message: "at least one upper case character") # |> validate_format(:password, ~r/[!?@#$%^&*_0-9]/, message: "at least one digit or punctuation character")