mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-11-27 10:42:38 +01:00
Support _PREFIXED variable names and fail when variable missing
This commit is contained in:
1 parent
0db0cdfd6c
commit
787a0433cb
4 files changed
+26
-10
No files matched your search
@@ -160,7 +160,7 @@ const EnvironmentEditor = function ({
|
||||
const validateName = useCallback((name: string) => {
|
||||
// Empty just means the variable doesn't have a name yet, and is unusable
|
||||
if (name === '') return true;
|
||||
return name.match(/^[a-z][a-z0-9_-]*$/i) != null;
|
||||
return name.match(/^[a-z_][a-z0-9_-]*$/i) != null;
|
||||
}, []);
|
||||
|
||||
return (
|
||||
|
||||
Reference in new issue
Block a user