This repository was archived by the owner on May 18, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -80,7 +80,9 @@ const SignInForm = ({ redirectPath }: { redirectPath: string }) => {
8080 useState ( false ) ;
8181
8282 const validationSchema = yup . object ( ) . shape ( {
83- emailOrUsername : yup . string ( ) . required ( t ( "common.error.field-required" ) ) ,
83+ emailOrUsername : config . get ( "ldap.enabled" )
84+ ? yup . string ( ) . matches ( / ^ [ ^ @ ] + $ / , t ( "signIn.error.invalid-username" ) )
85+ : yup . string ( ) . required ( t ( "common.error.field-required" ) ) ,
8486 password : yup
8587 . string ( )
8688 . min ( 8 , t ( "common.error.too-short" , { length : 8 } ) )
@@ -172,8 +174,16 @@ const SignInForm = ({ redirectPath }: { redirectPath: string }) => {
172174 } ) }
173175 >
174176 < TextInput
175- label = { t ( "signin.input.email-or-username" ) }
176- placeholder = { t ( "signin.input.email-or-username.placeholder" ) }
177+ label = {
178+ config . get ( "ldap.enabled" )
179+ ? t ( "signup.input.username" )
180+ : t ( "signin.input.email-or-username" )
181+ }
182+ placeholder = {
183+ config . get ( "ldap.enabled" )
184+ ? t ( "signup.input.username.placeholder" )
185+ : t ( "signin.input.email-or-username.placeholder" )
186+ }
177187 { ...form . getInputProps ( "emailOrUsername" ) }
178188 />
179189 < PasswordInput
Original file line number Diff line number Diff line change @@ -50,6 +50,7 @@ export default {
5050 "signIn.oauth.microsoft" : "Microsoft" ,
5151 "signIn.oauth.discord" : "Discord" ,
5252 "signIn.oauth.oidc" : "OpenID" ,
53+ "signIn.error.invalid-username" : "Invalid username" ,
5354
5455 // END /auth/signin
5556
You can’t perform that action at this time.
0 commit comments