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

commonMain.neat.Validators.kt Maven / Gradle / Ivy

package neat

import neat.internal.OptionalValidator
import neat.internal.ValidatingFunction

open class Validators(val label: String) {

    internal val functions = mutableMapOf>()

    fun configure(validator: ValidationFactory?): Validator {
        if (validator == null) return optional()
        return validator()
    }

    open fun optional(): Validator = OptionalValidator(this)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy