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:
parent
c89ca7e64b
commit
428c1d2b99
2 changed files with 5 additions and 7 deletions
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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({
|
||||
|
|
Loading…
Add table
Reference in a new issue