@@ -370,6 +370,8 @@ export function createAccountAddHandler(
370370 minLength : 1 ,
371371 maxLength : 100 ,
372372 pattern : patterns . accountName ,
373+ patternErrorMessage :
374+ "can only contain letters, numbers, spaces, hyphens, and underscores" ,
373375 transform : sanitizers . trim ,
374376 } ) ;
375377
@@ -616,6 +618,8 @@ export function createAccountRenameHandler(dbOps: DatabaseOperations) {
616618 minLength : 1 ,
617619 maxLength : 100 ,
618620 pattern : patterns . accountName ,
621+ patternErrorMessage :
622+ "can only contain letters, numbers, spaces, hyphens, and underscores" ,
619623 transform : sanitizers . trim ,
620624 } ) ;
621625
@@ -679,6 +683,8 @@ export function createZaiAccountAddHandler(dbOps: DatabaseOperations) {
679683 minLength : 1 ,
680684 maxLength : 100 ,
681685 pattern : patterns . accountName ,
686+ patternErrorMessage :
687+ "can only contain letters, numbers, spaces, hyphens, and underscores" ,
682688 transform : sanitizers . trim ,
683689 } ) ;
684690
@@ -834,6 +840,8 @@ export function createOpenAIAccountAddHandler(dbOps: DatabaseOperations) {
834840 minLength : 1 ,
835841 maxLength : 100 ,
836842 pattern : patterns . accountName ,
843+ patternErrorMessage :
844+ "can only contain letters, numbers, spaces, hyphens, and underscores" ,
837845 transform : sanitizers . trim ,
838846 } ) ;
839847
@@ -998,6 +1006,8 @@ export function createVertexAIAccountAddHandler(dbOps: DatabaseOperations) {
9981006 minLength : 1 ,
9991007 maxLength : 100 ,
10001008 pattern : patterns . accountName ,
1009+ patternErrorMessage :
1010+ "can only contain letters, numbers, spaces, hyphens, and underscores" ,
10011011 transform : sanitizers . trim ,
10021012 } ) ;
10031013
@@ -1137,6 +1147,8 @@ export function createMinimaxAccountAddHandler(dbOps: DatabaseOperations) {
11371147 minLength : 1 ,
11381148 maxLength : 100 ,
11391149 pattern : patterns . accountName ,
1150+ patternErrorMessage :
1151+ "can only contain letters, numbers, spaces, hyphens, and underscores" ,
11401152 transform : sanitizers . trim ,
11411153 } ) ;
11421154
@@ -1269,6 +1281,8 @@ export function createNanoGPTAccountAddHandler(dbOps: DatabaseOperations) {
12691281 minLength : 1 ,
12701282 maxLength : 100 ,
12711283 pattern : patterns . accountName ,
1284+ patternErrorMessage :
1285+ "can only contain letters, numbers, spaces, hyphens, and underscores" ,
12721286 transform : sanitizers . trim ,
12731287 } ) ;
12741288 if ( ! name ) {
@@ -1440,6 +1454,8 @@ export function createAnthropicCompatibleAccountAddHandler(
14401454 minLength : 1 ,
14411455 maxLength : 100 ,
14421456 pattern : patterns . accountName ,
1457+ patternErrorMessage :
1458+ "can only contain letters, numbers, spaces, hyphens, and underscores" ,
14431459 transform : sanitizers . trim ,
14441460 } ) ;
14451461
0 commit comments