Currently the ValidatingStore does not offer any possibility to trigger the validation from the outside. The latter is quite important for situiations, where you need to make sure, all data is valid, but the user might not have yet changed anything.
The current solution might look like this:
class TriggerValidatingStore(data: String, validation: Validation<String, Unit, ComponentValidationMessage>, job: Job) :
ValidatingStore<String, Unit, ComponentValidationMessage>(data, validation, Unit, job) {
// this handler makes the validation available - not sure whether the `List<ComponentValidationMessage>` should get emitted!
val validate = handle { state ->
validate(state)
state
}
}
Imho this is base functionality and should be integrated into the core type!