in validate.go [35:51]
func validateAllStringInSlice(fl validator.FieldLevel) bool {
candidatesQuery := linq.From(strings.Split(fl.Param(), " "))
parentStruct := fl.Parent()
fieldName := fl.FieldName()
thisField := parentStruct.FieldByName(fieldName)
if !thisField.IsValid() || thisField.IsZero() {
return true
}
values, ok := thisField.Interface().([]string)
if !ok {
return false
}
valuesQuery := linq.From(values)
return !valuesQuery.Except(candidatesQuery).Any()
}