0
Fork 0
mirror of https://github.com/stonith404/pingvin-share.git synced 2025-01-29 01:28:59 -05:00

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
No known key found for this signature in database
GPG key ID: 07E623B294202B6C
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({