8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
type TestStruct struct { Start string `json:"start" validate:"date|minLen:10"` End string `json:"end" validate:"date|minLen:10|gteField:start"` } start = "2021-12-17" end = "2020-12-16"
验证通过
The text was updated successfully, but these errors were encountered:
这是比较大小的呀。 比较 字符串 这个我没试过
Sorry, something went wrong.
67c93b3
已经调整,支持比较字符串了 https://github.com/gookit/validate/releases/tag/v1.4.3
CooperationStart string `json:"cooperation_start" validate:"date|minLen:10"` //开始日期 CooperationEnd string `json:"cooperation_end" validate:"date|minLen:10|gteField:cooperation_start"` //结束日期
"cooperation_start"名字里带下划线"_"校验就通不过,用驼峰就可以"cooperationStart"
CooperationStart string `json:"cooperationStart" validate:"date|minLen:10"` //开始日期 CooperationEnd string `json:"cooperation_end" validate:"date|minLen:10|gteField:cooperationStart"` //结束日期
这样就能通过
inhere
No branches or pull requests
验证通过
The text was updated successfully, but these errors were encountered: