SetItemValidationTrigger - Andrei15193/react-model-view-viewmodel GitHub Wiki
API / SetItemValidationTrigger<TItem> class
Represents a set item validation trigger. Instead of triggering a validation only when the set changes, a validation may be triggered by any of the contained items when they themselves change.
This is useful when within the collection there is a field that needs to be unique, such as a unique name for each item in the collection.
Extends ValidationTrigger<INotifySetChanged<TItem> & Iterable<TItem>>.
class SetItemValidationTrigger<TItem>
extends ValidationTrigger<INotifySetChanged<TItem> | Iterable<TItem>>
Source reference: src/validation/triggers/SetItemValidationTrigger.ts:42
.
- TItem - The type of items the set contains.
-
constructor - Initializes a new instance of the
SetItemValidationTrigger<TItem>
class.
-
inherited
readonly
trigger - Gets the source object that triggers validation. -
inherited
readonly
validationTriggered - Gets an event that is raised whenever the source object triggers a validation.
-
override
protected
subscribeToTarget - Subscribes to set and item changes. -
override
protected
unsubscribeFromTarget - Unsubscribes from set and item changes.
-
ValidationTrigger<TTrigger>
- ViewModelChangedValidationTrigger<TViewModel>
- CollectionChangedValidationTrigger<TItem, TCollection>
- CollectionReorderedValidationTrigger<TItem, TCollection>
- SetChangedValidationTrigger<TItem, TSet>
- MapChangedValidationTrigger<TKey, TItem, TMap>
- CollectionItemValidationTrigger<TItem>
- SetItemValidationTrigger<TItem>
- MapItemValidationTrigger<TKey, TItem>