Table of Contents

Class TrueAssertValidator

Namespace
CloudyWing.FormValidators
Assembly
CloudyWing.FormValidators.dll

The true assert validator.

public class TrueAssertValidator : IFormValidator
Inheritance
TrueAssertValidator
Implements
Inherited Members

Constructors

TrueAssertValidator(bool, string)

Initializes a new instance of the TrueAssertValidator class.

public TrueAssertValidator(bool isTrue, string errorMessage)

Parameters

isTrue bool

if set to true [is true].

errorMessage string

The error message.

TrueAssertValidator(Func<bool>, string)

Initializes a new instance of the TrueAssertValidator class.

public TrueAssertValidator(Func<bool> truePredicate, string errorMessage)

Parameters

truePredicate Func<bool>

The true predicate.

errorMessage string

The error message.

Properties

ErrorMessage

Gets the error message.

public string ErrorMessage { get; }

Property Value

string

The error message.

IsValid

Returns true if ... is valid.

public bool IsValid { get; }

Property Value

bool

true if this instance is valid; otherwise, false.

Methods

Validate()

Validates this instance.

public bool Validate()

Returns

bool

The validation result.