Defines the properties and methods that objects that participate in Web Forms validation must implement.
Assembly: System.Web (in System.Web.dll)
Classes that implement this interface represent a possible user input error. When the Validate method is called, the class updates its IsValid property to signify whether the error occurred. The ErrorMessage property contains a text description of the error condition that you can display when the error occurs.
The BaseValidator class implements this interface, and all other ASP.NET validation server control classes inherit from BaseValidator. For information on validation server controls and how they work, see ASP.NET Validation Controls.
For details on how to develop custom ASP.NET validation server controls, see How to: Validate with a Custom Function for ASP.NET Server Controls.
This example has a text box that accepts user input, which is a potential security threat. By default, ASP.NET Web pages validate that user input does not include script or HTML elements. For more information, see Script Exploits Overview.
Available since 1.1