Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: 修改/新增菜单选根目录时提示ParentId值不能为空 #1707

Closed
crazyrunsnail opened this issue Apr 12, 2024 · 0 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@crazyrunsnail
Copy link
Contributor

crazyrunsnail commented Apr 12, 2024

gin-vue-admin 版本

main

Node 版本

v20.12.0

Golang 版本

go 1.21.1

是否依旧存在

可以

bug描述

修改/新增菜单选根目录时提示ParentId值不能为空

问题分析:
当ParentId类型是uint时传0不能通过NotEmpty的校验,在validator的 isBlank,uint类型的值等于0是返回True

修改建议

  1. isBlank对于uint==0返回false
  2. PranetId的校验条件设置成 Ge(0) verify.go: fix ParentId can't pass notempty verify #1708
@crazyrunsnail crazyrunsnail added the bug Something isn't working label Apr 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants