fix: don't enforce password lenght for sign in form because of LDAP

This commit is contained in:
Elias Schneider
2024-10-24 14:01:10 +02:00
parent c89ca7e64b
commit 428c1d2b99
2 changed files with 5 additions and 7 deletions

View File

@@ -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;
}

View File

@@ -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({