Back to Devexpress

Validation Rules

expressappframework-113008-validation-validation-rules.md

latest2.8 KB
Original Source

Validation Rules

  • Jul 23, 2025
  • 2 minutes to read

XAF provides several built-in types of Validation Rules. They are defined in the following table:

Validation Rule typeDescription
RuleCombinationOfPropertiesIsUniqueDemands that the combination of particular property values should be unique.
RuleCriteriaDemands that an object of a particular type should satisfy a specified criteria.
RuleFromBoolPropertyDemands that a Boolean type property should have a True value.
RuleIsReferencedDemands that an object should be referenced in objects of a specified type.
RuleObjectExistsDemands that an object of a particular type that satisfies specified criteria exists in the database.
RuleRangeDemands that a particular property’s value should be within a specified value range.
RuleRegularExpressionDemands that a particular property should match a specified pattern.
RuleRequiredFieldDemands that a property should have a value.
RuleStringComparisonDemands that the value of a particular String type property should satisfy a specified condition.
RuleValueComparisonDemands that a particular property’s value should satisfy a specified condition.
RuleUniqueValueDemands that a particular property’s value should be unique.

All of these Validation Rule types implement the IRule interface. You can develop your own Rules by implementing the IRule interface, or by inheriting from the RuleBase abstract class, which implements this interface. For details, refer to the Implement Custom Rules topic.

See Also

Declare Validation Rules