feat: 修复必传数据解析错误问题

This commit is contained in:
2026-01-06 19:01:21 +08:00
parent 8ed6735d48
commit 708e327ddf

View File

@@ -42,7 +42,7 @@ func ParseValidateRule(dataType reflect.Type, ruleStr string) ValidateRule {
if len(itemRule) == 0 {
continue
}
if strings.Contains(itemRule, "=") {
if !strings.Contains(itemRule, "=") {
// 一定是无需要值的验证规则
switch itemRule {
case consts.ValidatorRuleCommonRequired.String(): // 必传