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

jsMain.Validations.kt Maven / Gradle / Ivy

package pt.lightweightform.lfkotlin

import kotlin.js.Promise

/** Asynchronous schema validation. */
public interface AsyncValidation : Validation {
    /**
     * Asynchronously validates a value within a context by returning an iterable of found issues.
     */
    public fun Context.validate(value: T): Promise>
}

/** Asynchronous computed "is required" validation. */
public interface AsyncIsRequired : IsRequired {
    /** Asynchronously verifies whether a value is required within a context. */
    public fun Context.isRequired(): Promise
}

/** Asynchronous computed "allowed values" validation. */
public interface AsyncAllowedValues : AllowedValues {
    /** Asynchronously returns the allowed values that a schema is allowed to contain. */
    public fun Context.allowedValues(): Promise?>
}

/** Asynchronous computed "bound" used for validation. */
public interface AsyncBound : Bound {
    /** Asynchronously returns a bound that should be respected. */
    public fun Context.bound(): Promise
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy