Try our conversational search powered by Generative AI!

Class ValidationError

Represents a validation error.

Inheritance
System.Object
ValidationError
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Validation
Assembly: EPiServer.Framework.dll
Version: 11.20.7
Syntax
public class ValidationError

Constructors

ValidationError()

Initializes a new instance of the ValidationError class.

Declaration
public ValidationError()

Properties

ErrorMessage

Gets or sets the error message.

Declaration
public string ErrorMessage { get; set; }
Property Value
Type Description
System.String

The error message.

PropertyName

Gets or sets the name of the property that validation failed for.

Declaration
public string PropertyName { get; set; }
Property Value
Type Description
System.String

The name of the property.

RelatedProperties

Gets or sets the related properties whose values are affected of PropertyName value.

Declaration
public IEnumerable<string> RelatedProperties { get; set; }
Property Value
Type Description
System.Collections.Generic.IEnumerable<System.String>

The related properties.

Severity

Gets or sets the severity of the validation error.

Declaration
public ValidationErrorSeverity Severity { get; set; }
Property Value
Type Description
ValidationErrorSeverity

The severity.

Remarks

Default value is Error.

Source

Gets or sets the IValidate<T> implementation that caused the validation error.

Declaration
public object Source { get; set; }
Property Value
Type Description
System.Object

The source.

ValidationType

Gets or sets the type of the validation that caused the validation error.

Declaration
public ValidationErrorType ValidationType { get; set; }
Property Value
Type Description
ValidationErrorType

The type of the validation.

Extension Methods