diff --git a/datahub-web-react/src/app/domain/CreateDomainModal.tsx b/datahub-web-react/src/app/domain/CreateDomainModal.tsx index 5eb1d7cda2..984c226d36 100644 --- a/datahub-web-react/src/app/domain/CreateDomainModal.tsx +++ b/datahub-web-react/src/app/domain/CreateDomainModal.tsx @@ -22,8 +22,6 @@ type Props = { }; const SUGGESTED_DOMAIN_NAMES = ['Engineering', 'Marketing', 'Sales', 'Product']; -/** Regex Validations */ -export const USER_NAME_REGEX = new RegExp('^[a-zA-Z ]*$'); export default function CreateDomainModal({ visible, onClose, onCreate }: Props) { const [stagedName, setStagedName] = useState(''); @@ -99,11 +97,7 @@ export default function CreateDomainModal({ visible, onClose, onCreate }: Props) message: 'Enter a Domain name.', }, { whitespace: true }, - { min: 2, max: 50 }, - { - pattern: USER_NAME_REGEX, - message: '', - }, + { min: 1, max: 50 }, ]} hasFeedback > diff --git a/datahub-web-react/src/app/identity/group/CreateGroupModal.tsx b/datahub-web-react/src/app/identity/group/CreateGroupModal.tsx index 1429bef7c8..77a3dcd5c7 100644 --- a/datahub-web-react/src/app/identity/group/CreateGroupModal.tsx +++ b/datahub-web-react/src/app/identity/group/CreateGroupModal.tsx @@ -9,8 +9,6 @@ type Props = { onClose: () => void; onCreate: (name: string, description: string) => void; }; -/** Regex Validations */ -export const USER_NAME_REGEX = new RegExp('^[a-zA-Z ]*$'); export default function CreateGroupModal({ visible, onClose, onCreate }: Props) { const [stagedName, setStagedName] = useState(''); @@ -86,10 +84,6 @@ export default function CreateGroupModal({ visible, onClose, onCreate }: Props) }, { whitespace: true }, { min: 1, max: 50 }, - { - pattern: USER_NAME_REGEX, - message: '', - }, ]} hasFeedback > diff --git a/datahub-web-react/src/app/ingest/secret/SecretBuilderModal.tsx b/datahub-web-react/src/app/ingest/secret/SecretBuilderModal.tsx index eaf17d2691..7d76f3c74c 100644 --- a/datahub-web-react/src/app/ingest/secret/SecretBuilderModal.tsx +++ b/datahub-web-react/src/app/ingest/secret/SecretBuilderModal.tsx @@ -9,8 +9,6 @@ type Props = { onSubmit?: (source: SecretBuilderState, resetState: () => void) => void; onCancel?: () => void; }; -/** Regex Validations */ -export const SECRET_NAME_ALPHANUMERIC = new RegExp('^[a-zA-Z0-9_/]+(?:[w·-]*[a-zA-Z0-9/]+)*$'); export const SecretBuilderModal = ({ initialState, visible, onSubmit, onCancel }: Props) => { const [secretBuilderState, setSecretBuilderState] = useState(initialState || {}); @@ -85,10 +83,6 @@ export const SecretBuilderModal = ({ initialState, visible, onSubmit, onCancel } }, { whitespace: true }, { min: 1, max: 50 }, - { - pattern: SECRET_NAME_ALPHANUMERIC, - message: '', - }, ]} hasFeedback >