validate Collection
open fun validateCollection(message: String, predicate: (C) -> Boolean): CollectionOptionBuilder<T, C>(source)
Adds validation for the entire collection after all elements are parsed. This validation is applied to the complete collection, allowing validation of collection-level properties like size, uniqueness, etc.
Return
This builder for method chaining
Parameters
message
Error message to display if validation fails
predicate
Function that returns true if the collection is valid