Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
RuoYi Vue
Commits
c0d430f4
Unverified
Commit
c0d430f4
authored
Apr 07, 2022
by
XCSDN
Committed by
Gitee
Apr 07, 2022
Browse files
update ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysDictType.java.
字典类型必须以字母开头,且字典类型只能由小写字母或加下划线还有数字组成 防止由于字典类型不符合前端开发规范而报错
parent
d9108881
Changes
1
Hide whitespace changes
Inline
Side-by-side
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysDictType.java
View file @
c0d430f4
package
com.ruoyi.common.core.domain.entity
;
import
javax.validation.constraints.Pattern
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.Size
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
...
...
@@ -26,6 +27,9 @@ public class SysDictType extends BaseEntity
private
String
dictName
;
/** 字典类型 */
@NotBlank
(
message
=
"字典类型不能为空"
)
@Pattern
(
regexp
=
"^[a-z][a-z0-9_]*$"
,
message
=
"字典类型必须以字母开头,且字典类型只能由小写字母或加下划线还有数字组成"
)
@Size
(
min
=
2
,
max
=
200
,
message
=
"字典类型长度必须在2-200个字符之间"
)
@Excel
(
name
=
"字典类型"
)
private
String
dictType
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment