.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+
.NET Core 3.0+

RuleBase Members

Serves as the base class for Validation Rules.

Constructors

Name Description
RuleBase() Initializes a new instance of the RuleBase class.
RuleBase(IRuleBaseProperties) Initializes a new instance of the RuleBase class and initializes the RuleBase.Properties property.

Fields

Name Description
PropertiesCustomMessageTemplate Holds the name of the RuleBaseProperties.CustomMessageTemplate property.
PropertiesId Holds the name of the RuleBaseProperties.Id property.
PropertiesInvertResult Holds the name of the RuleBaseProperties.InvertResult property.
PropertiesMessageTemplateCollectionValidationMessageSuffix Holds the name of the RuleBaseProperties.MessageTemplateCollectionValidationMessageSuffix property.
PropertiesMessageTemplateSkipNullOrEmptyValues Holds the name of the RuleBaseProperties.MessageTemplateSkipNullOrEmptyValues property.
PropertiesMessageTemplateTargetDoesNotSatisfyCollectionCriteria Holds the name of the RuleBaseProperties.MessageTemplateTargetDoesNotSatisfyCollectionCriteria property.
PropertiesMessageTemplateTargetDoesNotSatisfyTargetCriteria Holds the name of the RuleBaseProperties.MessageTemplateTargetDoesNotSatisfyTargetCriteria property.
PropertiesName Holds the name of the RuleBaseProperties.Name property.
PropertiesSkipNullOrEmptyValues Holds the name of the RuleBaseProperties.SkipNullOrEmptyValues property.
PropertiesTargetContextIDs Holds the name of the RuleBaseProperties.TargetContextIDs property.
PropertiesTargetCriteria Holds the name of the RuleBaseProperties.TargetCriteria property.
PropertiesTargetType Holds the name of the RuleBaseProperties.TargetType property.

Properties

Name Description
DefaultMessageTemplateCollectionValidationMessageSuffix static Specifies the default additional text displayed when the Validation Rule applied to a collection property is broken.
DefaultMessageTemplateSkipNullOrEmptyValues static Specifies the default template for the message displayed when the Validation Rule was not checked because one of the target property values is null or empty.
DefaultMessageTemplateTargetDoesNotSatisfyCollectionCriteria static Specifies the default template for the message displayed when the Validation Rule was not checked because the validated object is not an element of the target collection.
DefaultMessageTemplateTargetDoesNotSatisfyTargetCriteria static Specifies the default template for the message displayed when the Validation Rule was not checked because the criteria specified by the RuleBaseProperties.TargetCriteria property is not satisfied by the validated object.
Id Returns the identifier of the current Validation Rule.
Properties Represents the Validation Rule's properties exported to the Application Model.
PropertiesType Specifies the type of the Validation Rule Properties class used by the Validation Rule.
TargetObject Specifies the object currently being validated by the Validation Rule.
UsedProperties Specifies the names of the properties to be highlighted when the current Validation Rule is broken.

Methods

Name Description
Equals(Object) Determines whether the specified object is equal to the current object. Inherited from Object.
Equals(Object, Object) static Determines whether the specified object instances are considered equal. Inherited from Object.
GetHashCode() Serves as the default hash function. Inherited from Object.
GetType() Gets the Type of the current instance. Inherited from Object.
GetValidationResultMessage(String, RuleBase, Object) static For internal use.
MemberwiseClone() protected Creates a shallow copy of the current Object. Inherited from Object.
ReferenceEquals(Object, Object) static Determines whether the specified Object instances are the same instance. Inherited from Object.
ToString() Returns a string that represents the current object. Inherited from Object.
Validate(Object) Checks that a particular object satisfies the Validation Rule.

Events

Name Description
CustomFormatValidationMessage static Occurs when the validation result message is being formatted.
See Also