File tree 4 files changed +5
-5
lines changed
4 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -101,7 +101,7 @@ export default {
101
101
if (commandNameMinLength) return ' Name can not be shorter than 3 characters.' ;
102
102
const commandNameMaxLength = this .name .length > 32 ;
103
103
if (commandNameMaxLength) return ' Name can not be longer than 32 characters.' ;
104
- const invalidCharacters = ! (/ ^ [0-9a-zA-Z _] + $ / .test (this .name ));
104
+ const invalidCharacters = ! (/ ^ [\w _-] {1,32} $ / u .test (this .name ));
105
105
if (invalidCharacters) return ' Name contains invalid characters.' ;
106
106
return null ;
107
107
},
Original file line number Diff line number Diff line change @@ -97,7 +97,7 @@ export default {
97
97
if (nameMinLength) return ' The sub command name can not be shorter than 3 characters!' ;
98
98
const nameMaxLength = this .name .length > 32 ;
99
99
if (nameMaxLength) return ' The sub command name can not be longer than 32 characters!' ;
100
- const invalidCharacters = ! (/ ^ [0-9a-zA-Z _] + $ / .test (this .name ));
100
+ const invalidCharacters = ! (/ ^ [\w _-] {1,32} $ / u .test (this .name ));
101
101
if (invalidCharacters) return ' Name contains invalid characters.' ;
102
102
return null ;
103
103
},
Original file line number Diff line number Diff line change @@ -97,7 +97,7 @@ export default {
97
97
if (nameMinLength) return ' The group name can not be shorter than 3 characters!' ;
98
98
const nameMaxLength = this .name .length > 32 ;
99
99
if (nameMaxLength) return ' The group name can not be longer than 32 characters!' ;
100
- const invalidCharacters = ! (/ ^ [0-9a-zA-Z _] + $ / .test (this .name ));
100
+ const invalidCharacters = ! (/ ^ [\w _-] {1,32} $ / u .test (this .name ));
101
101
if (invalidCharacters) return ' Name contains invalid characters.' ;
102
102
return null ;
103
103
},
Original file line number Diff line number Diff line change @@ -203,7 +203,7 @@ export default {
203
203
if (nameMinLength) return ' The option name can not be shorter than 3 characters!' ;
204
204
const nameMaxLength = this .name .length > 32 ;
205
205
if (nameMaxLength) return ' The option name can not be longer than 32 characters!' ;
206
- const invalidCharacters = ! (/ ^ [0-9a-zA-Z _] + $ / .test (this .name ));
206
+ const invalidCharacters = ! (/ ^ [\w _-] {1,32} $ / u .test (this .name ));
207
207
if (invalidCharacters) return ' Name contains invalid characters.' ;
208
208
return null ;
209
209
},
@@ -274,4 +274,4 @@ export default {
274
274
}
275
275
}
276
276
};
277
- < / script>
277
+ < / script>
You can’t perform that action at this time.
0 commit comments