diff --git a/src/routes/team/[team]/(teamPages)/[env]/secret/[secret]/AddKeyValue.svelte b/src/routes/team/[team]/(teamPages)/[env]/secret/[secret]/AddKeyValue.svelte index a4d11d94..fcd5b110 100644 --- a/src/routes/team/[team]/(teamPages)/[env]/secret/[secret]/AddKeyValue.svelte +++ b/src/routes/team/[team]/(teamPages)/[env]/secret/[secret]/AddKeyValue.svelte @@ -42,12 +42,12 @@ return 'Must be less than 253 characters'; } - if (/^[_a-zA-Z0-9]+$/.test(key) === false) { - return 'Can only contain letters, numbers, or _'; + if (/^[-._a-zA-Z0-9]+$/.test(key) === false) { + return 'Must consist of letters, numbers, or certain special characters (underscores, hyphens, and periods)'; } - if (/^[a-zA-Z_]+/.test(key) === false) { - return 'Must start with a letter or _'; + if (/^[a-zA-Z_.-]+/.test(key) === false) { + return 'Must start with a letter or one of the following special characters: (underscores, hyphens, and periods)'; } return ''; }; @@ -87,7 +87,9 @@ error={validKey(key)} > Key - Example: SOME_KEY + Examples: SOME_KEY, some.key, or some-key