Click or drag to resize

ValidationTemplate Class

A validation template for using Validar.Fody (https://github.com/Fody/Validar) with data annotations (System.ComponentModel.DataAnnotations).

Inheritance Hierarchy
SystemObject
  TomsToolbox.DesktopValidationTemplate

Namespace:  TomsToolbox.Desktop
Assembly:  TomsToolbox.Desktop (in TomsToolbox.Desktop.dll) Version: 1.0.64.0 (1.0.64.0)
Syntax
public class ValidationTemplate : IDataErrorInfo

The ValidationTemplate type exposes the following members.

Constructors
  NameDescription
Public methodValidationTemplate
Initializes a new instance of the ValidationTemplate class.
Top
Properties
  NameDescription
Public propertyError
Gets an error message indicating what is wrong with this object.
Public propertyItem
Gets the error message for the property with the given name.
Top
Extension Methods
Remarks
When using the net45 package, INotifyDataErrorInfo is supported as well.
Examples
To activate the validation template just add this line to your AssemblyInfo.cs after you have installed the Validar.Fody package:

C#
[assembly: ValidationTemplateAttribute(typeof(TomsToolbox.Desktop.ValidationTemplate))]
Contracts
Invariants
_target != null
_validationContext != null
_validationResults != null
Learn more about contracts
See Also