Class ValidationError
Encapsulates an ErrorType and an ErrorText
Implements
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 SourceValidationError(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. |
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. |
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. |
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 SourceErrorType
Gets or sets the type of the error.
Declaration
public ValidationErrorType ErrorType { get; set; }
Property Value
Type | Description |
---|---|
ValidationErrorType | The type of the error. |