Class ValidationError
Encapsulates an ErrorType and an ErrorText
Implements
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. |
| 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 |
|---|---|---|
| Guid | id | The unique identifier of the error. |
| ValidationErrorType | errorType | Type of the error. |
| 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 |
|---|---|---|
| Guid | id | The error id. |
| object | source | The error source. |
| ValidationErrorType | errorType | Type of the error. |
| 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 |
|---|---|---|
| Guid | id | The error id. |
| object | source | The error source. |
| string | errorText | The error text. |
| 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. |