-
Notifications
You must be signed in to change notification settings - Fork 2
ObjectValidator
API / ObjectValidator<TValidatable, TValidationError> class
Represents a base implementation for an object validator.
Implements IObjectValidator<TValidatable, TValidationError>.
class ObjectValidator<TValidatable extends IValidatable<TValidationError> | INotifyPropertiesChanged, TValidationError = string>
implements IObjectValidator<TValidatable, TValidationError>
Source reference: src/validation/objectValidator/ObjectValidator.ts:26
.
-
TValidatable - The instance type that is being validated.
Type constraints: IValidatable<TValidationError> & INotifyPropertiesChanged.
-
TValidationError - The concrete type for representing validation errors (strings, enums, numbers etc.).
Default value:
string
.
-
constructor - Initializes a new instance of the
ObjectValidator<TValidatable, TValidationError>
class.
-
readonly
target - Gets the object that is being validated. -
readonly
triggers - Gets the validation triggers that have been configured. -
readonly
validators - Gets the validators that have been configured.
- add - Configures the given validators and validates the target afterwards.
-
reset - Resets the validator configuraiton, removes all triggers and validators and sets the error on the target to
null
. - validate - Validates the target using the currently configured validators. Validation does get triggered when the
- ObjectValidator<TValidatable, TValidationError>
Overview
Motivation
Guides and Tutorials - Getting Started
Releases
CodeSandbox
API
Events
IEvent
IEventHandler
EventDispatcher
ViewModels
INotifyPropertiesChanged
ViewModel
Forms
Form
IFormFieldConfig
FormField
ReadOnlyFormCollection
FormCollection
IConfigurableFormCollection
FormSetupCallback
Validation
IValidator
ValidatorCallback
IObjectValidator
IValidatable
Validation / Triggers
WellKnownValidationTrigger
ValidationTrigger
Observable Collection
ReadOnlyObservableCollection
ObservableCollection
INotifyCollectionChanged
CollectionChangeOperation
INotifyCollectionReordered
CollectionReorderOperation
Observable Map
ReadOnlyObservableMap
ObservableMap
INotifyMapChanged
MapChangeOperation
Observable Set
ReadOnlyObservableSet
ObservableSet
INotifySetChanged
SetChangeOperation
Dependency Handling
IDependencyResolver
IDependencyContainer
DependencyContainer
useDependency
useViewModelDependency
useDependencyResolver
React Hooks
useViewModel
useViewModelMemo
useObservableCollection
useObservableMap
useObservableSet