예제 #1
0
func minItemsError(param *spec.Parameter) *errors.Validation {
	return errors.TooFewItems(param.Name, param.In, *param.MinItems)
}
func minItemsErrorItems(path, in string, items *spec.Items) *errors.Validation {
	return errors.TooFewItems(path, in, *items.MinItems)
}
예제 #3
0
파일: values.go 프로젝트: gbjk/go-swagger
// MinItems validates that there are at least n items in a slice
func MinItems(path, in string, size, min int64) *errors.Validation {
	if size < min {
		return errors.TooFewItems(path, in, min)
	}
	return nil
}