Show / Hide Table of Contents

Struct StringValidation.Result

The object produced when validating a string.

Inherited Members
ValueType.Equals(object)
ValueType.GetHashCode()
ValueType.ToString()
object.GetType()
object.Equals(object, object)
object.ReferenceEquals(object, object)
Namespace: SadConsole
Assembly: SadConsole.dll
Syntax
public readonly struct StringValidation.Result

Constructors

Result(bool, string?)

Creates a new string validation result.

Declaration
public Result(bool isValid, string? errorMsg = null)
Parameters
Type Name Description
bool isValid

A value to indicate that the result is valid or not.

string errorMsg

A message associated with the result when isValid is false.

Fields

ErrorMessage

The error message when IsValid is false. May be an empty string when there isn't a message.

Declaration
public readonly string ErrorMessage
Field Value
Type Description
string

IsValid

Indicates whether or not this result is valid.

Declaration
public readonly bool IsValid
Field Value
Type Description
bool

Methods

Success()

A successful result.

Declaration
public static StringValidation.Result Success()
Returns
Type Description
StringValidation.Result

A successful result.

In this article

Back to top

Back to top Generated by DocFX