func Compose()

in core.go [32:48]


func Compose(validators ...validator.Validator) validator.Validator {
	return func(actual interface{}) *llresult.Results {
		res := make([]*llresult.Results, len(validators))
		for idx, validator := range validators {
			res[idx] = validator(actual)
		}

		combined := llresult.NewResults()
		for _, r := range res {
			r.EachResult(func(path llpath.Path, vr llresult.ValueResult) bool {
				combined.Record(path, vr)
				return true
			})
		}
		return combined
	}
}