StringValidation.Result Struct
Definition
Section titled “Definition”The object produced when validating a string.
public readonly struct StringValidation.ResultConstructors
Section titled “Constructors”Result(bool, string?)
Section titled “Result(bool, string?)”Creates a new string validation result.
public Result(bool isValid, string? errorMsg = null)Parameters
Section titled “Parameters”isValid bool
A value to indicate that the result is valid or not.
errorMsg string
A message associated with the result when isValid is false.
Fields
Section titled “Fields”IsValid
Section titled “IsValid”Indicates whether or not this result is valid.
public readonly bool IsValidErrorMessage
Section titled “ErrorMessage”The error message when IsValid is false. May be an empty string when there isn’t a message.
public readonly string ErrorMessageMethods
Section titled “Methods”Success()
Section titled “Success()”A successful result.
public static StringValidation.Result Success()Returns
Section titled “Returns”StringValidation.Result
A successful result.