validate

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

Validates the parts of the form value formValue matching path against the validator's schema. Returns a future that completes with a list of found validation issues.

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 validate(formValue: T, externalContexts: ExternalContexts? = null, runCriteria: ValidateRunCriteria = ValidateRunCriteria.ExternalIfInternalValid): CompletableFuture<List<LocatedValidationIssue>>

Validates all parts of the form value formValue against the validator's schema. Returns a future that completes with a list of found validation issues.

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.