Table of Contents

Namespace Tlumach.DataAnnotations

Classes

TlumachCompareAttribute

A CompareAttribute that takes its error message from a class created by Tlumach Generator.

The message template receives the display name of the member as {0} and the display name of the other property as {1}, which is the order that CompareAttribute itself uses.

TlumachEmailAddressAttribute

An e-mail address validation attribute that takes its error message from a class created by Tlumach Generator.

The message template receives the display name of the member as {0}.

TlumachMessageResolver

Resolves the localized message of a validation attribute from a class created by Tlumach Generator.

An instance of this class is composed into every localized validation attribute of Tlumach. It is also available to an attribute that an application derives from TlumachValidationAttribute and that needs the message template itself.

TlumachPhoneAttribute

A telephone number validation attribute that takes its error message from a class created by Tlumach Generator.

The message template receives the display name of the member as {0}.

TlumachRangeAttribute

A RangeAttribute that takes its error message from a class created by Tlumach Generator.

The message template receives the display name of the member as {0}, Minimum as {1} and Maximum as {2}, which is the order that RangeAttribute itself uses.

TlumachRegularExpressionAttribute

A RegularExpressionAttribute that takes its error message from a class created by Tlumach Generator.

The message template receives the display name of the member as {0} and Pattern as {1}, which is the order that RegularExpressionAttribute itself uses.

TlumachRequiredAttribute

A RequiredAttribute that takes its error message from a class created by Tlumach Generator.

The message template receives the display name of the member as {0}.

TlumachStringLengthAttribute

A StringLengthAttribute that takes its error message from a class created by Tlumach Generator.

The message template receives the display name of the member as {0}, MaximumLength as {1} and MinimumLength as {2}, which is the order that StringLengthAttribute itself uses.

TlumachValidationAttribute

The base class for a validation attribute of an application that takes its error message from a class created by Tlumach Generator.

Derive from this class when none of the localized attributes of Tlumach fits. A derived class obtains the message through MessageResolver, which is also the place to get the raw template from when the message takes more arguments than the display name.

TlumachValidationDefaults

Process-wide settings shared by the localized validation attributes of Tlumach.

Interfaces

ITlumachLocalizedErrorMessage

Implemented by validation attributes that take their error message from a Tlumach translation.

The localized validation attributes of Tlumach derive from different attributes of System.ComponentModel.DataAnnotations and cannot share a common base class, so this interface is what TlumachMessageResolver talks to. The ErrorMessage and ErrorMessageResourceName members are satisfied by the properties that every implementer inherits from ValidationAttribute; an implementer does not write any code for them.

Enums

TranslationCultureSource

Selects the culture, for which a localized validation message is read.