We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 16623e2 + 74ccbe5 commit 0680cddCopy full SHA for 0680cdd
README.md
@@ -2775,7 +2775,7 @@ You can also build content-dependent schemas by using a callback function `:comp
2775
:compile (fn [_properties [min max] _options]
2776
(when-not (and (int? min) (int? max))
2777
(m/-fail! ::invalid-children {:min min, :max max}))
2778
- {:pred #(and (int? %) (>= min % max))
+ {:pred #(and (int? %) (<= min % max))
2779
:min 2 ;; at least 1 child
2780
:max 2 ;; at most 1 child
2781
:type-properties {:error/fn (fn [error _] (str "should be between " min " and " max ", was " (:value error)))
0 commit comments