-- | The spec requires @"maxItems"@ to be non-negative.
maxItemsVal :: MaxItems -> Vector Value -> Maybe MaxItemsInvalid
maxItemsVal a@(MaxItems n) xs
    | n < 0           = Nothing
    | V.length xs > n = Just (MaxItemsInvalid a xs)
    | otherwise       = Nothing
maxItemsVal :: MaxItems -> Vector Value -> Maybe MaxItemsInvalid
maxItemsVal a@(MaxItems n) xs
    | n < 0           = Nothing
    | V.length xs > n = Just (MaxItemsInvalid a xs)
    | otherwise       = Nothing
maxItemsVal a@(MaxItems n) xs
    | n < 0           = Nothing
    | V.length xs > n = Just (MaxItemsInvalid a xs)
    | otherwise       = Nothing