Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ function validateKeyName(
if (name.length > MAX_KEY_NAME_LENGTH) {
return { valid: false, error: t("keyNameTooLong", { max: MAX_KEY_NAME_LENGTH }) };
}
// Only allow alphanumeric, spaces, hyphens, underscores
if (!/^[a-zA-Z0-9_\-\s]+$/.test(name)) {
// Allow Unicode letters (accented chars), numbers, spaces, hyphens, underscores
if (!/^[\p{L}\p{N}_\-\s]+$/u.test(name)) {
return {
valid: false,
error: t("keyNameInvalid"),
Expand Down
2 changes: 1 addition & 1 deletion src/i18n/messages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -977,7 +977,7 @@
"tipSeparate": "Create separate keys for different clients or environments",
"tipRestrict": "Restrict keys to specific models for better security and cost control",
"keyName": "Key Name",
"keyNamePlaceholder": "e.g., Production Key, Development Key",
"keyNamePlaceholder": "e.g. Production Key",
"keyNameDesc": "Choose a descriptive name to identify this key's purpose",
"keyCreated": "API Key Created",
"keyCreatedSuccess": "Key created successfully!",
Expand Down
2 changes: 1 addition & 1 deletion src/i18n/messages/pt-BR.json
Original file line number Diff line number Diff line change
Expand Up @@ -875,7 +875,7 @@
"tipSeparate": "Crie chaves separadas para diferentes clientes ou ambientes",
"tipRestrict": "Restrinja chaves a modelos específicos para maior segurança e controle de custos",
"keyName": "Nome da Chave",
"keyNamePlaceholder": "ex: Chave de Produção, Chave de Desenvolvimento",
"keyNamePlaceholder": "ex: Chave de Produção",
"keyNameDesc": "Escolha um nome descritivo para identificar o propósito desta chave",
"keyCreated": "Chave de API Criada",
"keyCreatedSuccess": "Chave criada com sucesso!",
Expand Down