diff --git a/templates/frontend/src/components/shared/file-browser/add-file-modal/add-file-modal.jsx b/templates/frontend/src/components/shared/file-browser/add-file-modal/add-file-modal.jsx index 8f0df064..a1158703 100644 --- a/templates/frontend/src/components/shared/file-browser/add-file-modal/add-file-modal.jsx +++ b/templates/frontend/src/components/shared/file-browser/add-file-modal/add-file-modal.jsx @@ -16,8 +16,8 @@ const schema = yup.object().shape({ name: yup .string() .required('Name is required') - .matches(/^[A-Za-z0-9.{}\-_\s]+$/, { - message: 'Name is not valid', + .matches(/^[A-Za-z0-9.{}\-_\s\[\]]+$/, { + message: 'Name should have only allowed symbols A-Za-z0-9.{}[]-_', }), }); const cx = classNames.bind(styles); diff --git a/templates/frontend/src/components/shared/file-browser/add-folder-modal/add-folder-modal.jsx b/templates/frontend/src/components/shared/file-browser/add-folder-modal/add-folder-modal.jsx index 75a0b42e..8661ab8f 100644 --- a/templates/frontend/src/components/shared/file-browser/add-folder-modal/add-folder-modal.jsx +++ b/templates/frontend/src/components/shared/file-browser/add-folder-modal/add-folder-modal.jsx @@ -16,8 +16,8 @@ const schema = yup.object().shape({ name: yup .string() .required('Name is required') - .matches(/^[A-Za-z0-9.{}\-_\s]+$/, { - message: 'Name should have only allowed symbols A-Za-z0-9.{}-_ ', + .matches(/^[A-Za-z0-9.{}\-_\s\[\]]+$/, { + message: 'Name should have only allowed symbols A-Za-z0-9.{}[]-_', }), }); const cx = classNames.bind(styles);