nesk / akkurate

The expressive validation library for Kotlin
https://akkurate.dev
Apache License 2.0
225 stars 9 forks source link

Support validating nullable iterables #16

Closed nesk closed 8 months ago

nesk commented 8 months ago

The following functions should support nullable iterables:

public operator fun <T> Validatable<Iterable<T>>.iterator(): Iterator<Validatable<T>>

public inline fun <T> Validatable<Iterable<T>>.each(block: Validatable<T>.() -> Unit)

Currently, the following code doesn't work, each isn't callable:

Validator<List<Any>?> {
    each { /* ... */ }
}