RuleSet.CustomIsEmptyValue Event

Occurs when the RuleSet.IsEmptyValue method is executed to determine whether or not the property value is considered empty.

Namespace: DevExpress.Persistent.Validation

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

Declaration

public static event EventHandler<CustomIsEmptyValueEventArgs> CustomIsEmptyValue
Public Shared Event CustomIsEmptyValue As EventHandler(Of CustomIsEmptyValueEventArgs)

The CustomIsEmptyValue event handler receives an argument of the CustomIsEmptyValueEventArgs type. The following properties provide information specific to this event.

Property Description
IsEmpty Specifies whether or not the validation rule's target property value is considered to be empty.
PropertyName Gets the name of the validation rule's target property.
PropertyValue Gets the validation rule's target property value.
TargetObject Gets the validation rule's target object.

Note that the event occurs at the validation process of each rule to determine whether a property value should be considered empty.

Handle this event to determine when the RuleRequiredFieldAttribute validation rule considers that its target property has a value. Access the handler's CustomIsEmptyValueEventArgs.TargetObject, CustomIsEmptyValueEventArgs.PropertyName and CustomIsEmptyValueEventArgs.PropertyValue parameters to implement the custom validation logic. Pass the validation result via the handler's CustomIsEmptyValueEventArgs.IsEmpty parameter and set the Handled parameter to true.

See Also