zhangqian
2024-04-26 d0175e436b5987511dfedb713abd19cba6093fab
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
package utils
 
var (
    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()}}
    LoginVerify            = Rules{"CaptchaId": {NotEmpty()}, "Username": {NotEmpty()}, "Password": {NotEmpty()}}
    RegisterVerify         = Rules{"Username": {NotEmpty()}, "NickName": {NotEmpty()}, "Password": {NotEmpty()}, "AuthorityId": {NotEmpty()}}
    PageInfoVerify         = Rules{"Page": {NotEmpty()}, "PageSize": {NotEmpty()}}
    CustomerVerify         = Rules{"CustomerName": {NotEmpty()}, "CustomerPhoneData": {NotEmpty()}}
    AutoCodeVerify         = Rules{"Abbreviation": {NotEmpty()}, "StructName": {NotEmpty()}, "PackageName": {NotEmpty()}, "Fields": {NotEmpty()}}
    AutoPackageVerify      = Rules{"PackageName": {NotEmpty()}}
    AuthorityVerify        = Rules{"AuthorityId": {NotEmpty()}, "AuthorityName": {NotEmpty()}}
    AuthorityIdVerify      = Rules{"AuthorityId": {NotEmpty()}}
    OldAuthorityVerify     = Rules{"OldAuthorityId": {NotEmpty()}}
    ChangePasswordVerify   = Rules{"Password": {NotEmpty()}, "NewPassword": {NotEmpty()}}
    SetUserAuthorityVerify = Rules{"AuthorityId": {NotEmpty()}}
)