diff --git a/backend/src/auth/dto/authSignIn.dto.ts b/backend/src/auth/dto/authSignIn.dto.ts index 42e7cb91..b56e79ed 100644 --- a/backend/src/auth/dto/authSignIn.dto.ts +++ b/backend/src/auth/dto/authSignIn.dto.ts @@ -1,8 +1,6 @@ -import { PickType } from "@nestjs/swagger"; import { IsEmail, IsOptional, IsString } from "class-validator"; -import { UserDTO } from "src/user/dto/user.dto"; -export class AuthSignInDTO extends PickType(UserDTO, ["password"] as const) { +export class AuthSignInDTO { @IsEmail() @IsOptional() email: string; @@ -10,4 +8,7 @@ export class AuthSignInDTO extends PickType(UserDTO, ["password"] as const) { @IsString() @IsOptional() username: string; + + @IsString() + password: string; } diff --git a/frontend/src/components/auth/SignInForm.tsx b/frontend/src/components/auth/SignInForm.tsx index 17beb333..eda6f964 100644 --- a/frontend/src/components/auth/SignInForm.tsx +++ b/frontend/src/components/auth/SignInForm.tsx @@ -81,10 +81,7 @@ const SignInForm = ({ redirectPath }: { redirectPath: string }) => { const validationSchema = yup.object().shape({ emailOrUsername: yup.string().required(t("common.error.field-required")), - password: yup - .string() - .min(8, t("common.error.too-short", { length: 8 })) - .required(t("common.error.field-required")), + password: yup.string().required(t("common.error.field-required")), }); const form = useForm({