Support _PREFIXED variable names and fail when variable missing

This commit is contained in:
Gregory Schier
2025-03-06 07:15:02 -08:00
parent 0db0cdfd6c
commit 787a0433cb
4 changed files with 26 additions and 10 deletions

View File

@@ -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 (