validateFromState
Runs the validation, given its state, within a ValidationContext containing the value being validated and the value of all declared dependencies. Returns a flow over all found issues.
This method is called by the form manager instead of validate when validating stateful validations.
Note that the form utilities validate function (and, by consequence, the form validator) does not maintain validation states and, as such, does not ever explicitly call any methods specific to stateful validations like validateFromState. This is why we provide the following default implementation of validate:
override fun ValidationContext.validate(): Flow<Issue> = flow {
emitAll(validateFromState(initState(value)))
}Content copied to clipboard