Input Validator for WinForms provides the following public methods for validating:
C# | Copy Code |
---|---|
public bool Validate(object component, bool validateHidden, params object [] ignoredComponents); |
The first version validates the component passed in the 'component' parameter and all of its child components, but excludes the types of components specified in the 'ignoredComponents' parameter, along with their child components.
The second version of the Validate() method validates the component passed in the 'component' parameter, specifying with the 'validateChildren' parameter whether child components should be validated.
With both versions of the Validate() method, a boolean value is returned indicating whether or not the components are valid. Also, the 'validateHidden' parameter indicates whether or not hidden components should be validated or not. Components are considered to be visible even if they are not currently within the client area of their container. Hidden components are components that are collapsed or whose Visible property is set to false.