Table of Contents

Struct ValidationResult<T>

Namespace
Veritas
Assembly
Veritas.dll

Represents the outcome of validating an identifier.

public readonly struct ValidationResult<T>

Type Parameters

T

Strongly typed value when validation succeeds.

Inherited Members

Constructors

ValidationResult(bool, T?, ValidationError, string?)

Initializes a new instance of the ValidationResult<T> struct.

public ValidationResult(bool isValid, T? value, ValidationError error, string? message = null)

Parameters

isValid bool

Indicates whether the input was valid.

value T

The parsed value when validation succeeds.

error ValidationError

The error classification.

message string

Optional human-readable message.

Properties

Error

Gets the classification of any validation error.

public ValidationError Error { get; }

Property Value

ValidationError

IsValid

Gets a value indicating whether the input was valid.

public bool IsValid { get; }

Property Value

bool

Message

Gets an optional message describing the validation result.

public string? Message { get; }

Property Value

string

Value

Gets the parsed value when IsValid is true.

public T? Value { get; }

Property Value

T