Name

IValidator

Synopsis

This interface defines members used for validation controls. The Validate() method is used to examine supplied information, compare it with the valid parameters, and update IsValid property appropriately. The ErrorMessage contains the message that should be generated for the user when the supplied information is not valid.

When creating a custom validation control, you do not need to implement this interface. Instead, you should inherit from one of the validation classes in the System.Web.UI.WebControls namespace. The base class, System.Web.UI.WebControls.BaseValidator, implements this interface.

Public Interface IValidator
                  ' Public Instance Properties
   Public Property ErrorMessage As String  
   Public Property IsValid As Boolean  
' Public Instance Methods
   Public Sub Validate() 
End Interface

Get ASP.NET in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.