Program validates the value a user enters into a textbox


Discuss the below:

Q: Design and develop a program that validates the value a user enters into a TextBox control to ensure that the entry is a valid telephone number. The application should accept a maximum of 12 characters. When the user clicks a button, the program should determine if the entry is of the form 999-999-9999, where the character 9 represents any number.

If the entry is determined to be a telephone number, display an appropriate message, along with the separate substrings that compose the telephone number without the dashes. If the entry is not a telephone number, then display a message as to the reason why the entry is not a valid telephone number, clear the TextBox control and set focus to the TextBox control. Use String class methods to solve the problem.

 

Solution Preview :

Prepared by a verified Expert
Visual Basic Programming: Program validates the value a user enters into a textbox
Reference No:- TGS01938776

Now Priced at $20 (50% Discount)

Recommended (94%)

Rated (4.6/5)