Unverified Commit 0e0718d1 authored by Xingang Zhang's avatar Xingang Zhang Committed by GitHub

fix typo

hasReuired --> hasRequired
parent 654ebebe
...@@ -365,10 +365,10 @@ func (v *Validation) Valid(obj interface{}) (b bool, err error) { ...@@ -365,10 +365,10 @@ func (v *Validation) Valid(obj interface{}) (b bool, err error) {
return return
} }
var hasReuired bool var hasRequired bool
for _, vf := range vfs { for _, vf := range vfs {
if vf.Name == "Required" { if vf.Name == "Required" {
hasReuired = true hasRequired = true
} }
currentField := objV.Field(i).Interface() currentField := objV.Field(i).Interface()
...@@ -382,7 +382,7 @@ func (v *Validation) Valid(obj interface{}) (b bool, err error) { ...@@ -382,7 +382,7 @@ func (v *Validation) Valid(obj interface{}) (b bool, err error) {
chk := Required{""}.IsSatisfied(currentField) chk := Required{""}.IsSatisfied(currentField)
if !hasReuired && v.RequiredFirst && !chk { if !hasRequired && v.RequiredFirst && !chk {
if _, ok := CanSkipFuncs[vf.Name]; ok { if _, ok := CanSkipFuncs[vf.Name]; ok {
continue continue
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment