Skip to main content

ValidationFailure

Defines a validation failure

Assembly: ServiceStack.dll
View Source
Declaration
[Serializable]
public class ValidationFailure

Properties

PropertyName

The name of the property.

View Source
Declaration
public string PropertyName { get; set; }

ErrorMessage

The error message

View Source
Declaration
public string ErrorMessage { get; set; }

AttemptedValue

The property value that caused the failure.

View Source
Declaration
public object AttemptedValue { get; set; }

CustomState

Custom state associated with the failure.

View Source
Declaration
public object CustomState { get; set; }

Severity

Custom severity level associated with the failure.

View Source
Declaration
public Severity Severity { get; set; }

FormattedMessageArguments

Gets or sets the formatted message arguments. These are values for custom formatted message in validator resource files Same formatted message can be reused in UI and with same number of format placeholders Like "Value {0} that you entered should be {1}"

View Source
Declaration
[Obsolete("FormattedMessageArguments is unused and will be removed in FluentValidation 10.")]
public object[] FormattedMessageArguments { get; set; }

FormattedMessagePlaceholderValues

Gets or sets the formatted message placeholder values.

View Source
Declaration
public Dictionary<string, object> FormattedMessagePlaceholderValues { get; set; }

ErrorCodeResolver

View Source
Declaration
public static Func<string, string> ErrorCodeResolver { get; set; }

ErrorCode

View Source
Declaration
public string ErrorCode { get; set; }

Fields

ErrorCodeAliases

View Source
Declaration
public static Dictionary<string, string> ErrorCodeAliases

Methods

ToString()

Creates a textual representation of the failure.

View Source
Declaration
public override string ToString()
Returns

System.String

ServiceStackErrorCodeResolver(String)

View Source
Declaration
public static string ServiceStackErrorCodeResolver(string errorCode)
Returns

System.String

Parameters
TypeName
System.StringerrorCode