Skip to content

Commit b3189df

Browse files
authored
Update validate title logic (#6362)
1 parent 9de6c34 commit b3189df

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

packages/app/src/app/pages/Sandbox/Editor/Workspace/Files/DirectoryEntry/validateTitle.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ export const validateTitle = (id, title, siblings = []) => {
44
// It has whitespaces
55
return 'Title cannot have whitespaces';
66
}
7-
if (/[!@#%^&*(),?":{}|<>]/g.test(title)) {
7+
if (/[<>^:;,?"*|]/g.test(title)) {
88
return 'Title cannot have special characters';
99
}
1010

11-
if (title.length > 32) {
12-
return "The title can't be more than 32 characters long";
11+
if (title.length > 192) {
12+
return "The title can't be more than 192 characters long";
1313
}
1414

1515
if (title.includes('/') || title.includes('\\')) {

packages/app/src/app/pages/Sandbox/Editor/Workspace/screens/Explorer/Files/DirectoryEntry/validateTitle.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ export const validateTitle = (id, title, siblings = []) => {
44
// It has whitespaces
55
return 'Title cannot have whitespaces';
66
}
7-
if (/[!@#%^&*(),?":{}|<>]/g.test(title)) {
7+
if (/[<>^:;,?"*|]/g.test(title)) {
88
return 'Title cannot have special characters';
99
}
1010

11-
if (title.length > 32) {
12-
return "The title can't be more than 32 characters long";
11+
if (title.length > 192) {
12+
return "The title can't be more than 192 characters long";
1313
}
1414

1515
if (title.includes('/') || title.includes('\\')) {

0 commit comments

Comments
 (0)