Skip to main content
.NET Framework 4.6.2+

RuleCombinationOfPropertiesIsUniqueAttribute.FoundObjectMessageFormat Property

Gets or sets the format for specifying information on found objects in the validation error message.

Namespace: DevExpress.Persistent.Validation

Assembly: DevExpress.Persistent.Base.v24.2.dll

Declaration

public string FoundObjectMessageFormat { get; set; }

Property Value

Type Description
String

A string value that can include one variable. This variable will be set to the key property value of the found object.

Remarks

You can format a list of the found objects that is displayed in the Validation Error window for a broken rule. To do this, use the RuleCombinationOfPropertiesIsUniqueAttribute attribute’s FoundObjectMessageFormat parameter. The passed value will be set for the FoundObjectMessageFormat property of the Application Model’s Validation | Rules | Rule node. So, you can modify the value directly in the Model Editor.

By default, this property is set to “{0}”, which returns a list of found objects separated by the symbol that is specified by RuleCombinationOfPropertiesIsUniqueAttribute.FoundObjectMessagesSeparator.

When using the RuleCombinationOfPropertiesIsUniqueAttribute, the value for the FoundObjectMessageFormat property is passed as a named parameter. This means that you do not have to specify it. However, when specifying, use the following format: FoundObjectMessageFormat = “{0}” (FoundObjectMessageFormat := “{0}”, in Visual Basic).

If you set an empty string for FoundObjectMessageFormat, only text specified by MessageTemplateCombinationOfPropertiesMustBeUnique will be displayed in the validation window.

Note

The list of the found objects is written in the Validation Error window, if you do not specify CustomMessageTemplate in code or the Model Editor.

See Also