validate

fun <T> validate(formSchema: Schema<T>, formValue: T, path: Path, externalContexts: ExternalContexts? = null): Flow<LocatedValidationIssue>(source)
fun <T> validate(formSchema: Schema<T>, formValue: T, path: String, externalContexts: ExternalContexts? = null): Flow<LocatedValidationIssue>(source)

Validates the parts of the form value formValue matching path against formSchema. Returns a flow of found validation issues.

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

Throws

If path matches no schemas.

If an exception occurs while running a validation.


fun <T> validate(formSchema: Schema<T>, formValue: T, externalContexts: ExternalContexts? = null): Flow<LocatedValidationIssue>(source)

Validates all parts of the form value formValue against formSchema. Returns a flow of found validation issues.

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

Throws

If an exception occurs while running a validation.