diff --git a/openmetadata-ui/src/main/resources/ui/src/components/AddDataQualityTest/AddDataQualityTestV1.tsx b/openmetadata-ui/src/main/resources/ui/src/components/AddDataQualityTest/AddDataQualityTestV1.tsx index 29b0c25769d..846d92af035 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/AddDataQualityTest/AddDataQualityTestV1.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/AddDataQualityTest/AddDataQualityTestV1.tsx @@ -129,7 +129,11 @@ const AddDataQualityTestV1: React.FC = ({ table }) => { const handleViewTestSuiteClick = () => { history.push( - getTestSuitePath(selectedTestSuite?.data?.fullyQualifiedName || '') + getTestSuitePath( + selectedTestSuite?.data?.fullyQualifiedName || + testSuiteData?.fullyQualifiedName || + '' + ) ); }; diff --git a/openmetadata-ui/src/main/resources/ui/src/components/AddDataQualityTest/components/SelectTestSuite.tsx b/openmetadata-ui/src/main/resources/ui/src/components/AddDataQualityTest/components/SelectTestSuite.tsx index 40827742b2a..a8221282910 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/AddDataQualityTest/components/SelectTestSuite.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/AddDataQualityTest/components/SelectTestSuite.tsx @@ -36,6 +36,7 @@ import { } from '../../../constants/constants'; import { TestSuite } from '../../../generated/tests/testSuite'; import { useAuth } from '../../../hooks/authHooks'; +import jsonData from '../../../jsons/en'; import SVGIcons, { Icons } from '../../../utils/SvgUtils'; import { showErrorToast } from '../../../utils/ToastUtils'; import RichTextEditor from '../../common/rich-text-editor/RichTextEditor'; @@ -167,6 +168,10 @@ const SelectTestSuite: React.FC = ({ required: isEmpty(form.getFieldValue('testSuiteId')), message: 'Name is required!', }, + { + pattern: /^[A-Za-z0-9_]*$/g, + message: jsonData.label['special-character-error'], + }, { validator: (_, value) => { if (testSuites.some((suite) => suite.name === value)) { diff --git a/openmetadata-ui/src/main/resources/ui/src/jsons/en.ts b/openmetadata-ui/src/main/resources/ui/src/jsons/en.ts index 5d6f69a17c8..27925b9258d 100644 --- a/openmetadata-ui/src/main/resources/ui/src/jsons/en.ts +++ b/openmetadata-ui/src/main/resources/ui/src/jsons/en.ts @@ -200,6 +200,7 @@ const jsonData = { 'Once you delete this entity, it will be removed permanently.', 'email-confirmation': 'Please confirm your email, confirmation has been sent to your email', + 'special-character-error': 'Special character is not allowed!', }, message: { 'no-services': 'No services',