Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

Commit

Permalink
Updated scene name regex (#10980)
Browse files Browse the repository at this point in the history
Underscores are not allowed at all, and hyphens can't be the end
character.

Updated invalidSceneName text to reflect this.

Resolves IR-3952
  • Loading branch information
barankyle authored Aug 16, 2024
1 parent b271989 commit 1bf2882
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/client-core/i18n/en/editor.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
"unknownStatus": "Unknown Status",
"CORS": "Possibly a CORS error",
"urlFetchError": "Failed to fetch \"{{url}}\"",
"invalidSceneName": "Scene name must be 4-64 characters long, using only alphanumeric characters, hyphens, and underscores."
"invalidSceneName": "Scene name must be 4-64 characters long, using only alphanumeric characters and hyphens, and begin and end with an alphanumeric."
},
"viewport": {
"title": "Viewport",
Expand Down
2 changes: 1 addition & 1 deletion packages/common/src/regex/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Ethereal Engine. All Rights Reserved.
export const VALID_FILENAME_REGEX = /^(?!.*[\s_<>:"/\\|?*\u0000-\u001F].*)[^\s_<>:"/\\|?*\u0000-\u001F]{1,64}$/
// eslint-disable-next-line no-control-regex
export const WINDOWS_RESERVED_NAME_REGEX = /^(con|prn|aux|nul|com\d|lpt\d)$/i
export const VALID_SCENE_NAME_REGEX = /^[a-zA-Z0-9][a-zA-Z0-9-]{2,62}[a-zA-Z0-9_\-]$/
export const VALID_SCENE_NAME_REGEX = /^[a-zA-Z0-9][a-zA-Z0-9-]{2,62}[a-zA-Z0-9]$/
export const VALID_HEIRARCHY_SEARCH_REGEX = /[.*+?^${}()|[\]\\]/g

/**
Expand Down

0 comments on commit 1bf2882

Please sign in to comment.