You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cms.validation=> ((vr/length-of :stuff :is 5) {:stuff [1 2 3 4 5]})
ClassCastException clojure.lang.PersistentVector cannot be cast to java.lang.CharSequence clojure.string/blank? (string.clj:291)
I see you're using count under the hood, so length-of should be adaptable? In any case, it would sure be great to have a vector length validation function in Validateur.
The text was updated successfully, but these errors were encountered:
length-of includes a nil check and a blank string check using not-allowed-to-be-blank? under the hood;
not-allowed-to-be-blank? blindly applies string/blank? to its input, whether it is a string or not;
this cannot even be overridden with allow-blank true, because not-allowed-to-be-blank? checks allowed-blanklast, so it always makes the string/blank? call, even if unnecessary;
this same check is then repeated (with inverted Boolean logic, but same end effect) in equal-length-of and range-length-of, so it'd also need to be fixed there.
The main size/length/count check would indeed accept anything that count knows how to handle, including vectors.
I see you're using
count
under the hood, solength-of
should be adaptable? In any case, it would sure be great to have a vector length validation function in Validateur.The text was updated successfully, but these errors were encountered: