IValidatable

Description

interface Tinman.Core.Validating.IValidatable

Base interface for classes that can validate their instances.

Public / Methods

Validate


public method Validate → (1)

validator in : Validator

[not-null]
The validator object.

Validates the state of this object.

Extensions

Validate​Info


public static method ValidateInfo → (2)

context opt : object = null

Optional context object.

member opt : string = null

Optional name of root member.

returns → ValidateResult

The validation result.

Validates the given object using a temporary Validator object.

This method uses Validator.BeginContext and Validator.End to provide the given context opt, if not null. Then it delegates to Validator.Validate (if member opt is empty) or Validator.ValidateMember (if member opt is not empty).

Validate​Throw​Errors


public static method ValidateThrowErrors → (4)

source in : string @ Tag

Error source tag.

context opt : object = null

Optional context object.

member opt : string = null

Optional name of root member.

message opt : string = null

Optional error message.

Validates the given object with ValidateInfo and throws a ValidatingException if the validation fails because of errors (see ValidateMessageType.Error).

ValidatingException

If the validation has failed.

Validate​Throw​Errors​And​Warnings


public static method ValidateThrowErrorsAndWarnings → (4)

source in : string @ Tag

Error source tag.

context opt : object = null

Optional context object.

member opt : string = null

Optional name of root member.

message opt : string = null

Optional error message.

Validates the given object with ValidateInfo and throws a ValidatingException if the validation fails because of errors (see ValidateMessageType.Error) or warnings (see ValidateMessageType.Warning).

ValidatingException

If the validation has failed.