Vb validating event
You can use this for example to ensure that password entered matches the confirmation password on input form or to ensure that numeric input value is greater than number you specify.
Here is an example of input form that uses comparison validation to ensure that two password fields are the same: Next step is to attach event handler for Validate Value event on custom validator. NET property grid using the combo-box on top of the property grid: With Custom Validator component selected, switch to the event view: And double-click the Validate Value event to create event handler: Here is example code for Validate Value event handler: C# This example validation simply checks whether value entered is “Dot Net Bar” and validates control input if it is. Validating Event On Container At the bottom of this article you can find sample project that shows how to create simple Custom Validator from code.
Working with Super Validator from Code When working with Super Validator using VS. If you have dialog form with validation attached to the controls and validation type is set to per-control or container, to be able to close the form as response to Cancel button being clicked you would simply disable validator by setting Enabled property to false: Then you can close your form as usual using Close method.
NET designer all settings that you make are actually translated into the code that you can find in Initialize Component() method of your form. Container Control = my Parent Form super Validator1. If you wish to use custom error provider to display validation errors in your application you can do so by implementing IError Provider interface.
For example you can require the input for text-box and enforce the format to be an email by assigning Validation1 and Validation2 properties.Super Validator also provides validation based on the Regular Expressions.