Application #31. Validate Text Boxes

This sample demonstrates a technique for performing data validation on text boxes. Along the way, you’ll see how to use regular expressions to perform data validation and how to create new user controls using inheritance. The sample application, shown in Figure 4-6, presents the user with five text boxes to enter the following data:

  • ZIP Code (U.S.)

  • E-Mail Address

  • IP Address

  • Social Security Number

  • Phone Number (U.S.)

Figure 4-6. The Validating TextBoxes sample application demonstrates a technique for performing data validation on text boxes.

What makes this application unique is that each text box is self-validating. ...

Get 101 Microsoft® Visual Basic® .NET Applications now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.