ValidationResult Class

Represents a validation result.
public sealed class ValidationResult
Namespace
Spectre.Console

Properties

string Message
Gets the validation error message.
bool Successful
Gets a value indicating whether or not validation was successful.

Methods

static ValidationResult Error(string)
Returns a ValidationResult representing a validation error.
static ValidationResult Success()
Returns a ValidationResult representing successful validation.

Extension Methods

T And<ValidationResult>(Action<ValidationResult>)
Performs the specified action on the given object and then returns the object. Useful for fluent testing patterns where additional assertions or operations are chained together in a readable manner.