Show / Hide Table of Contents

Class ValidationError

Encapsulates an ErrorType and an ErrorText

Inheritance
System.Object
Error
PropertyError
ValidationError
Implements
IError
PropertyError.FieldName
Error.ErrorText
Error.Id
Error.GetHashCode()
Error.Equals(Object)
Error.Equals(IError)
Error.GetSourceId()
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Sartorius.SAF.Validation
Assembly: Sartorius.SAF.dll
Syntax
[Serializable]
[Obsolete("Use ValidationAttributes or ObservableObject.OnValidate.")]
public class ValidationError : PropertyError, IError

Constructors

View Source

ValidationError(ValidationErrorType, String)

Initializes a new instance of the ValidationError class.

Declaration
public ValidationError(ValidationErrorType errorType, string errorText)
Parameters
Type Name Description
ValidationErrorType errorType

Type of the error.

System.String errorText

The error text.

View Source

ValidationError(Guid, ValidationErrorType, String)

Initializes a new instance of the ValidationError class.

Declaration
public ValidationError(Guid id, ValidationErrorType errorType, string errorText)
Parameters
Type Name Description
System.Guid id

The unique identifier of the error.

ValidationErrorType errorType

Type of the error.

System.String errorText

The error text.

View Source

ValidationError(Guid, Object, ValidationErrorType, String)

Creates a new instance of the ValidationError class.

Declaration
public ValidationError(Guid id, object source, ValidationErrorType errorType, string errorText)
Parameters
Type Name Description
System.Guid id

The error id.

System.Object source

The error source.

ValidationErrorType errorType

Type of the error.

System.String errorText

The error text.

View Source

ValidationError(Guid, Object, String, String)

Creates a new instance of the ValidationError class.

Declaration
public ValidationError(Guid id, object source, string errorText, string fieldName = null)
Parameters
Type Name Description
System.Guid id

The error id.

System.Object source

The error source.

System.String errorText

The error text.

System.String fieldName

The name of the field (property that caused the error.

Properties

View Source

ErrorType

Gets or sets the type of the error.

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

The type of the error.

Implements

IError

Extension Methods

CollectionExtensions.AddRange<T, TCollection>(TCollection, IEnumerable<T>)
SerializableObjectCloneExtension.Clone<T>(T)
  • View Source
Back to top Generated by DocFX