FieldValidationResult

Name Value
Assembly Catel.Core
Namespace Catel.Data
Available on .NET Framework 4.5, .NET Framework 4.6, Portable Class Libraries, Xamarin - Android, Xamarin - iOS
public class FieldValidationResult : IFieldValidationResult, ValidationResult

Base types ValidationResult

Base types

IFieldValidationResult

Field validation result.

Constructors

FieldValidationResult(PropertyData property, ValidationResultType validationResultType, string messageFormat, object[] args)

Initializes a new instance of the FieldValidationResult class.

Parameters

Name Description
property The property data.
validationResultType Type of the validation result.
messageFormat The message format.
args The args.

Exceptions

Name Description
ArgumentNullException The property isnull.
ArgumentException The messageFormat isnull or whitespace.

FieldValidationResult(string propertyName, ValidationResultType validationResultType, string messageFormat, object[] args)

Initializes a new instance of the FieldValidationResult class.

Parameters

Name Description
propertyName Name of the property.
validationResultType Type of the validation result.
messageFormat The message format.
args The args.

Exceptions

Name Description
ArgumentException The propertyName isnull or whitespace.

Properties

PropertyName

Gets the name of the property.

Methods

CreateError(PropertyData propertyData, string messageFormat, object[] args)

Creates a FieldValidationResult containing an error.

Parameters

Name Description
propertyData The property data.
messageFormat The message format.
args The args.

Returns

The FieldValidationResult.

Exceptions

Name Description
ArgumentNullException The propertyData isnull.
ArgumentException The messageFormat isnull or whitespace.

CreateError(string propertyName, string messageFormat, object[] args)

Creates a FieldValidationResult containing an error.

Parameters

Name Description
propertyName Name of the property.
messageFormat The message format.
args The args.

Returns

The FieldValidationResult.

Exceptions

Name Description
ArgumentException The propertyName isnull or whitespace.

CreateError(Expression> propertyExpression, string messageFormat, object[] args)

Creates a FieldValidationResult containing an error.

Type Parameters

TProperty The type of the property.

Parameters

Name Description
propertyExpression The property expression.
messageFormat The message format.
args The args.

Returns

The FieldValidationResult.

Exceptions

Name Description
ArgumentException The propertyExpression isnull.

CreateErrorWithTag(PropertyData propertyData, string message, object tag)

Creates a FieldValidationResult containing an error.

Parameters

Name Description
propertyData The property data.
message The message.
tag The tag.

Returns

The FieldValidationResult.

Exceptions

Name Description
ArgumentNullException The propertyData isnull.

CreateErrorWithTag(string propertyName, string message, object tag)

Creates a FieldValidationResult containing an error.

Parameters

Name Description
propertyName Name of the property.
message The message.
tag The tag.

Returns

The FieldValidationResult.

Exceptions

Name Description
ArgumentException The propertyName isnull or whitespace.
ArgumentNullException The message isnull.

CreateErrorWithTag(Expression> propertyExpression, string message, object tag)

Creates a FieldValidationResult containing an error.

Type Parameters

TProperty The type of the property.

Parameters

Name Description
propertyExpression The property expression.
message The message.
tag The tag.

Returns

The FieldValidationResult.

Exceptions

Name Description
ArgumentException The propertyExpression isnull.
ArgumentNullException The message isnull.

CreateWarning(PropertyData propertyData, string messageFormat, object[] args)

Creates a FieldValidationResult containing a warning.

Parameters

Name Description
propertyData The property data.
messageFormat The message format.
args The args.

Returns

The FieldValidationResult.

Exceptions

Name Description
ArgumentNullException The propertyData isnull.
ArgumentException The messageFormat isnull or whitespace.

CreateWarning(string propertyName, string messageFormat, object[] args)

Creates a FieldValidationResult containing a warning.

Parameters

Name Description
propertyName Name of the property.
messageFormat The message format.
args The args.

Returns

The FieldValidationResult.

Exceptions

Name Description
ArgumentException The propertyName isnull or whitespace.

CreateWarning(Expression> propertyExpression, string messageFormat, object[] args)

Creates a FieldValidationResult containing a warning.

Type Parameters

TProperty The type of themodel.

Parameters

Name Description
propertyExpression The property expression.
messageFormat The message format.
args The args.

Returns

The FieldValidationResult.

Exceptions

Name Description
ArgumentException The propertyExpression isnull.

CreateWarningWithTag(PropertyData propertyData, string message, object tag)

Creates a FieldValidationResult containing a warning.

Parameters

Name Description
propertyData The property data.
message The message.
tag The tag.

Returns

The FieldValidationResult.

Exceptions

Name Description
ArgumentNullException The propertyData isnull.

CreateWarningWithTag(string propertyName, string message, object tag)

Creates a FieldValidationResult containing a warning.

Parameters

Name Description
propertyName Name of the property.
message The message.
tag The tag.

Returns

The FieldValidationResult.

Exceptions

Name Description
ArgumentException The propertyName isnull or whitespace.
ArgumentNullException The message isnull.

CreateWarningWithTag(Expression> propertyExpression, string message, object tag)

Creates a FieldValidationResult containing a warning.

Type Parameters

TProperty The type of the property.

Parameters

Name Description
propertyExpression The property expression.
message The message.
tag The tag.

Returns

The FieldValidationResult.

Exceptions

Name Description
ArgumentException The propertyExpression isnull.
ArgumentNullException The message isnull.

ToString()

Returns a that represents this instance.

Returns

A that represents this instance.


Have a question about Catel? Use StackOverflow with the Catel tag!


Discussion