@@ -135,14 +135,14 @@ validateNumberConstraint (JSONPath path) num = \case
135 SNLt n -> do
135 SNLt n -> do
137 nlen = withKnownNat n $ natVal n
137 nlen = withKnownNat n $ natVal n
138− predicate = fromIntegral nlen < num
138+ predicate = num < fromIntegral nlen
139 errMsg = path <> " should be < " <> T.pack (show nlen)
139 errMsg = path <> " should be < " <> T.pack (show nlen)
140 warn = vWarning $ mmSingleton path (pure errMsg)
140 warn = vWarning $ mmSingleton path (pure errMsg)
141 unless predicate warn
141 unless predicate warn
142 SNLe n -> do
142 SNLe n -> do
144 nlen = withKnownNat n $ natVal n
144 nlen = withKnownNat n $ natVal n
145− predicate = fromIntegral nlen <= num
145+ predicate = num <= fromIntegral nlen
146 errMsg = path <> " should be <= " <> T.pack (show nlen)
146 errMsg = path <> " should be <= " <> T.pack (show nlen)
147 warn = vWarning $ mmSingleton path (pure errMsg)
147 warn = vWarning $ mmSingleton path (pure errMsg)
148 unless predicate warn
148 unless predicate warn