Total .NET Analyzer Rule Documentation  

ControlCausesValidation Rule

Consider setting the control's CausesValidation property to True.

Remarks

A control's CausesValidation event determines whether validation can be performed on the control. If this property is set to False, the control's Validating and Validated events are suppressed, and the control will not raise validation errors. In general, you should set the CausesValidation property to True for all controls, and add code to the Validating event when necessary (for instance, if you want to ensure that a user input field contains an appropriate number of characters, format, etc.)

Resolution

You can set the control's CausesValidation property to True through the Windows Form Designer Properties window.

See Also

Control.CausesValidation Property

Control.Validating Event