isValid

fun isValid(formValue: T, path: Path, externalContexts: ExternalContexts? = null, runCriteria: ValidateRunCriteria = ValidateRunCriteria.ExternalIfInternalValid): CompletableFuture<Boolean>
fun isValid(formValue: T, path: String, externalContexts: ExternalContexts? = null, runCriteria: ValidateRunCriteria = ValidateRunCriteria.ExternalIfInternalValid): CompletableFuture<Boolean>

Returns a future that completes with whether the parts of the form value formValue matching path are valid according to the validator's schema.

These parts are said to be valid if they contain no validation errors.

A map of externalContexts may be provided for validations that depend on them.

Provide a run criteria to specify whether to run schema-internal and/or external validations. By default, external validations only run if no errors were found when running schema-internal validations.

The future will complete exceptionally with InvalidPathException if path matches no schemas.


fun isValid(formValue: T, externalContexts: ExternalContexts? = null, runCriteria: ValidateRunCriteria = ValidateRunCriteria.ExternalIfInternalValid): CompletableFuture<Boolean>

Returns a future that completes with whether all parts of the form value formValue are valid according to the validator's schema.

These parts are said to be valid if they contain no validation errors.

A map of externalContexts should be provided for validations that depend on them.

Provide a run criteria to specify whether to run schema-internal and/or external validations. By default, external validations only run if no errors were found when running schema-internal validations.