ValidationProvider Class

Provides a mechanism to specify automatic or user requested validation for controls.

Namespace: Microsoft.Practices.EnterpriseLibrary.Validation.Integration.WinForms
Assembly: Microsoft.Practices.EnterpriseLibrary.Validation.Integration.WinForms (in Microsoft.Practices.EnterpriseLibrary.Validation.Integration.WinForms.dll) Version: 6.0.0.0 (6.0.1304.0)

Syntax

public class ValidationProvider : Component, 
    IExtenderProvider
'Declaration
Public Class ValidationProvider
    Inherits Component
    Implements IExtenderProvider
public ref class ValidationProvider : public Component, 
    IExtenderProvider

Remarks

This component is an extender provider that adds properties to controls that allow the designer of the application to specify how to validate the controls' values using the Validation Application Block.

Validation can be automatic through the Validating event, or initiated via code by invoking the PerformValidation(Control) method; in both cases the control needs to have been properly configured through the validation provider.

An instance of ErrorProvider can be specified for the component; in this case the validation errors resulting from validating a control are set on the error provider as a properly formatted error message for the control.

A validation provider can be enabled or disabled through the Enabled property. When it is disabled no validation will occur and the validaton provider will be considered valid, and any error messages posted to the ErrorProvider will be cleared. If re-enabled, it will continue to be valid and no error messages will be posted until validation is triggered again.

Inheritance Hierarchy

System.Object
  System.MarshalByRefObject
    System.ComponentModel.Component
      Microsoft.Practices.EnterpriseLibrary.Validation.Integration.WinForms.ValidationProvider

See Also

ValidationProvider Members

Microsoft.Practices.EnterpriseLibrary.Validation.Integration.WinForms Namespace

ValidationProvider.IsValid

ValidationProvider.Enabled

ValidationProvider.PerformValidation(Control)

Microsoft.Practices.EnterpriseLibrary.Validation.Validator

Microsoft.Practices.EnterpriseLibrary.Validation.ValidationResults