mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-19 16:21:25 +01:00
Support dashes in template variable/fn names
This commit is contained in:
@@ -159,7 +159,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