Struct StringValidation.Result
The object produced when validating a string.
Inherited Members
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 |
Fields
ErrorMessage
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. |