ValidatingStore

fun <D, T, M> ValidatingStore(initialData: D, validation: Validation<D, T, M>, metadataDefault: T, 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.

metadataDefault

default metadata to be used by the automatic validation (where no explicit values are given)

validateAfterUpdate

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

id

id of this Store. Ids of parent Stores will be concatenated.