增加必填校验 提升casbin版本 (#1170)
* 添加rule检测 * 调整初始化顺序,防止在数据库创建错误的时候,修改了配置文件。 * (feat):自动生产代码新增校验 * 增加校验功能 升级casbin Co-authored-by: bypanghu <bypanghu@163.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
package utils
|
||||
|
||||
var (
|
||||
IdVerify = Rules{"ID": {NotEmpty()}}
|
||||
IdVerify = Rules{"ID": []string{NotEmpty()}}
|
||||
ApiVerify = Rules{"Path": {NotEmpty()}, "Description": {NotEmpty()}, "ApiGroup": {NotEmpty()}, "Method": {NotEmpty()}}
|
||||
MenuVerify = Rules{"Path": {NotEmpty()}, "ParentId": {NotEmpty()}, "Name": {NotEmpty()}, "Component": {NotEmpty()}, "Sort": {Ge("0")}}
|
||||
MenuMetaVerify = Rules{"Title": {NotEmpty()}}
|
||||
|
Reference in New Issue
Block a user