Skip to content

IReadOnlyObjectValidator

github-actions[bot] edited this page Dec 3, 2024 · 3 revisions
API / IReadOnlyObjectValidator<TValidatable, TValidationError> interface

Represents a read-only object validator.

interface IReadOnlyObjectValidator<TValidatable extends IReadOnlyValidatable<TValidationError> | INotifyPropertiesChanged, TValidationError = string>

Source reference: src/validation/objectValidator/IReadOnlyObjectValidator.ts:12.

Generic Parameters

  • TValidatable - The instance type that is being validated.

    Type constraints: IReadOnlyValidatable<TValidationError> & INotifyPropertiesChanged.

  • TValidationError - The concrete type for representing validation errors (strings, enums, numbers etc.).

    Default value: string.

Properties

  • 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.

Methods

  • validate - Validates the target using the currently configured validators. Validation does get triggered when the

Implementations

Clone this wiki locally