Skip to content

A Q&A platform software for teams at any scales. Whether it's a community forum, help center, or knowledge management platform, you can always count on Apache Answer.

feat(Tag): Remove the character check from the tag

haitao(lj)54c169e189c9
diff --git a/ui/src/hooks/useTagModal/index.tsx b/ui/src/hooks/useTagModal/index.tsx
index 4a24870a..f1b80af7 100644
--- a/ui/src/hooks/useTagModal/index.tsx
+++ b/ui/src/hooks/useTagModal/index.tsx
@@ -95,13 +95,13 @@ const useTagModal = (props: IProps = {}) => {
isInvalid: true,
errorMsg: t('form.fields.slug_name.msg.range'),
};
- } else if (/[^a-z0-9+#\-.]/.test(slugName.value)) {
- bol = false;
- formData.slugName = {
- value: slugName.value,
- isInvalid: true,
- errorMsg: t('form.fields.slug_name.msg.character'),
- };
+ // } else if (/[^a-z0-9+#\-.]/.test(slugName.value)) {
+ // bol = false;
+ // formData.slugName = {
+ // value: slugName.value,
+ // isInvalid: true,
+ // errorMsg: t('form.fields.slug_name.msg.character'),
+ // };
} else {
formData.slugName = {
value: slugName.value,
@@ -217,7 +217,9 @@ const useTagModal = (props: IProps = {}) => {
isInvalid={formData.slugName.isInvalid}
/>
- <Form.Text as="div">{t('form.fields.slug_name.desc')}</Form.Text>
+ <Form.Text as="div">
+ {t('form.fields.slug_name.msg.range')}
+ </Form.Text>
<Form.Control.Feedback type="invalid">
{formData.slugName.errorMsg}
</Form.Control.Feedback>