hello guys, i have created a form and added 4 textboxes where the user is asked to enter Name, Surname,Id card Number,and telephone Number, i need to do some code so that the user inputs things correctly such as :- only letter are entered in Name and Surname Fields, the Id card must accept eight numbers and a letter in the end the letters accepted should be A or G or M (example:- 45231223 A) and the phone number only numbers . one more thing i want that when ever the user inputs something invalid he gets an error message ?any help guys ?thanks. what i was thinking was something like this
for(int i = 0; i<temp.lenght. i ++){
if (!(char.IsLetter (temp[i])){
else
MessageBox.show(invalid input);