File tree Expand file tree Collapse file tree 1 file changed +2
-0
lines changed
src/client/src/pages/UserManagement Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ export const buildNameValidation = () => {
1111 return Yup . string ( )
1212 . trim ( )
1313 . min ( 2 , "Name must be at least 2 characters" )
14+ . max ( 50 , "Name cannot be more than 50 characters" )
1415 . matches ( / ^ (? ! .* ) [ a - z A - Z ] + $ / , "Name must only contain letters and non-consecutive internal spaces" )
1516 . required ( "Name is required" )
1617}
@@ -19,6 +20,7 @@ export const buildUsernameValidation = () => {
1920 return Yup . string ( )
2021 . trim ( )
2122 . min ( 2 , "Username must be at least 2 characters" )
23+ . max ( 50 , "Username cannot be more than 50 characters" )
2224 . matches ( / ^ [ a - z A - Z 0 - 9 ] .* $ / , "Username must begin with a letter or number" )
2325 . matches ( / ^ .* [ a - z A - Z 0 - 9 ] $ / , "Username must end with a letter or number" )
2426 . matches ( / ^ (? ! .* ?_ _ ) [ a - z A - Z 0 - 9 _ ] + $ / , "Username must contain only alphanumeric characters and non-consecutive underscores" )
You can’t perform that action at this time.
0 commit comments