validate

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

Validates the parts of the form value formValue matching path against the validator's schema. Returns a flow of found validation issues.

A map of external contexts 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.

Throws

If path matches no schemas.

If an exception occurs while running a validation.


fun validate(formValue: T, externalContexts: ExternalContexts? = null, runCriteria: ValidateRunCriteria = ValidateRunCriteria.ExternalIfInternalValid): Flow<LocatedValidationIssue>(source)

Validates all parts of the form value formValue against the validator's schema. Returns a flow of found validation issues.

A map of external contexts 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.

Throws

If an exception occurs while running a validation.