diff --git a/flossom-common/flossom-common-core/src/main/java/com/flossom/common/core/domain/entity/SysTag.java b/flossom-common/flossom-common-core/src/main/java/com/flossom/common/core/domain/entity/SysTag.java index a97290e..52940d1 100644 --- a/flossom-common/flossom-common-core/src/main/java/com/flossom/common/core/domain/entity/SysTag.java +++ b/flossom-common/flossom-common-core/src/main/java/com/flossom/common/core/domain/entity/SysTag.java @@ -88,7 +88,6 @@ public class SysTag extends BaseEntity } @NotBlank(message = "标签名称不能为空") - @Size(min = 0, max = 50, message = "标签名称长度不能超过50个字符") public String getTagName() { return tagName; diff --git a/flossom-ui/src/views/system/wechatTag/index.vue b/flossom-ui/src/views/system/wechatTag/index.vue index 83da034..35d570d 100644 --- a/flossom-ui/src/views/system/wechatTag/index.vue +++ b/flossom-ui/src/views/system/wechatTag/index.vue @@ -108,7 +108,7 @@ - + @@ -274,6 +274,17 @@ export default { }, /** 提交按钮 */ submitForm: function() { + if(this.form.parentId != null) { + if(this.form.tagName.length > 100) { + this.$modal.msgError("标签名称不能大于100个字符"); + return; + } + } else { + if(this.form.tagName.length > 50) { + this.$modal.msgError("标签名称不能大于50个字符"); + return; + } + } this.$refs["form"].validate(valid => { if (valid) { this.form.type = 1;