ValidatingStore

fun <D, T, M> ValidatingStore(initialData: D, validation: Validation<D, T, M>, validateAfterUpdate: Boolean = true, id: String = Id.next())

Parameters

initialData

first current value of this Store

validation

Validation function to use at the data on this Store.

validateAfterUpdate

flag to decide if a new value gets automatically validated after setting it to the Store.

id

id of this Store. Ids of SubStores will be concatenated.