1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-23 00:00:54 +00:00

Merge pull request #3245 from 0x0400/patch-1

fix typo
This commit is contained in:
astaxie 2018-07-20 14:43:38 +08:00 committed by GitHub
commit efbe655d6a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -365,10 +365,10 @@ func (v *Validation) Valid(obj interface{}) (b bool, err error) {
return
}
var hasReuired bool
var hasRequired bool
for _, vf := range vfs {
if vf.Name == "Required" {
hasReuired = true
hasRequired = true
}
currentField := objV.Field(i).Interface()
@ -382,7 +382,7 @@ func (v *Validation) Valid(obj interface{}) (b bool, err error) {
chk := Required{""}.IsSatisfied(currentField)
if !hasReuired && v.RequiredFirst && !chk {
if !hasRequired && v.RequiredFirst && !chk {
if _, ok := CanSkipFuncs[vf.Name]; ok {
continue
}