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.)
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. ...