AutoValidate Enumeration
Determines how a control validates its data when it loses user input focus.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
| Member name | Description | |
|---|---|---|
| Disable | Implicit validation will not occur. Setting this value will not interfere with explicit calls to Validate or ValidateChildren. | |
| EnablePreventFocusChange | Implicit validation occurs when the control loses focus. | |
| EnableAllowFocusChange | Implicit validation occurs, but if validation fails, focus will still change to the new control. If validation fails, the Validated event will not fire. | |
| Inherit | The control inherits its AutoValidate behavior from its container (such as a form or another control). If there is no container control, it defaults to EnablePreventFocusChange. |
If a user switches focus off of a Windows Forms control, the control will use AutoValidate to determine how to validate its data. This type of validation is called implicit validation, because it occurs without the application developer having to make an explicit call to Validate or ValidateChildren.
The property corresponding to this value will have different defaults based on the type of control. For more information, see User Input Validation in Windows Forms.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.