All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.io.konform.validation.Validation.kt Maven / Gradle / Ivy

package io.konform.validation

import io.konform.validation.internal.ValidationBuilderImpl

interface Validation {

    companion object {
        operator fun  invoke(init: ValidationBuilder.() -> Unit): Validation {
            val builder = ValidationBuilderImpl()
            return builder.apply(init).build()
        }
    }

    fun validate(value: T): ValidationResult
    operator fun invoke(value: T) = validate(value)
}


class Constraint internal constructor(val hint: String, val templateValues: List, val test: (R) -> Boolean)




© 2015 - 2024 Weber Informatics LLC | Privacy Policy