Otherwise, neither of the instances mentioned above lead to editor validation.
If you do not set the Cancel property, Windows Forms will assume that validation succeeded for that control, and raise the Validated event.
For a code example that validates an email address in a Text Box, see Validating.
You may require that certain text fields not be zero-length, that a field be formatted as a telephone number or other type of well-formed data, or that a string not contain any unsafe characters that could be used to compromise the security of a database.
Windows Forms provides several ways for you to validate input in your application.
You do not have to disable the Form’s Auto Validate property.