Skip to content

Commit

Permalink
Merge pull request #1 from ContinuumLLC/bugfix/RMM-24035-execution-ca…
Browse files Browse the repository at this point in the history
…n-be-created-with-empty-required-targets-field

Bugfix/rmm 24035 execution can be created with empty required targets field
  • Loading branch information
Prots committed Jan 18, 2018
2 parents b379ff2 + acafb75 commit 6da374c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions validator.go
Expand Up @@ -829,6 +829,10 @@ func typeCheck(v reflect.Value, t reflect.StructField, o reflect.Value, options
return false, customTypeErrors
}

if isEmptyValue(v) {
return checkRequired(v, t, options)
}

if isRootType {
// Ensure that we've checked the value by all specified validators before report that the value is valid
defer func() {
Expand Down

0 comments on commit 6da374c

Please sign in to comment.