refac/enh: allow underscore for prompt command
This commit is contained in:
1 parent
f1300a8fd9
commit
05895d9657
2 files changed
+4
-4
No files matched your search
@@ -59,8 +59,8 @@
|
||||
};
|
||||
|
||||
const validateCommandString = (inputString) => {
|
||||
// Regular expression to match only alphanumeric characters and hyphen
|
||||
const regex = /^[a-zA-Z0-9-]+$/;
|
||||
// Regular expression to match only alphanumeric characters, hyphen, and underscore
|
||||
const regex = /^[a-zA-Z0-9-_]+$/;
|
||||
|
||||
// Test the input string against the regular expression
|
||||
return regex.test(inputString);
|
||||
|
||||
Reference in new issue
Block a user