Version

ValidationResult Class

Contains information about the validation of a control or embeddable editor.
Syntax
'Declaration
 
Public Class ValidationResult 
public class ValidationResult 
Remarks

A ValidationResult instance corresponds to a single validation. In the case where multiple controls are validated by calling one of the Validate method overloads that supports multiple validations, a ValidationResult instance is created for each of those individual validations, regardless of whether that individual validation succeeded or failed. The Status property returns whether the validation succeeded and if it did not, the reason that it failed. The Value property returns the value that was evaluated during the validations session, and the ValidationSettings property returns a reference to the ValidationSettings instance which defines the validation criteria.

A ValidationResult instance is returned from the indexer of the collection returned by the Results and Errors properties of the Validation class. These collections reflect the individual outcome of each control that was validated; the Results collection contains one member for each control that was validated, and the Errors collection contains one member for each validation that failed. For example, if a validation involved three controls, and validation failed for one of the controls, the Count property of the Results collection would return three whereas the Count property of the Errors collection would return one.

Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also