Closed 1gravity closed 3 years ago
Thank you for the feedback @1gravity, but could you check where hasSize
is coming from?
Because it's not part of konform 😅. Konform contains JSONSchema style validations minItems
and maxItems
instead.
Lol, sorry for that. Wrong validation library. You can close the issue
My expectation for
hasSize(100)
is that the property is exactly 100 characters long but the function is defined like this:hasSize(min: Int = Int.MIN_VALUE, max: Int = Int.MAX_VALUE)
which translates tohasSize(100, Int.MAX_VALUE)
. I think there should be a one parameter functionhasSize(size: Int)
to prevent these misunderstandings and the two parameter function should not have default values for min/max.