Hi,
I have a textbox named fullnameTextbox. I want the user to only type letters in that textbox.I have a code for it but when there is a spacebar between 2 correctly typed words my error message pops up.How can i fix this?
Match matchMyRegex = Regex.Match(fullNameTextBox.Text, "^[a-zA-z]*$");
if (!matchMyRegex.Success)
{
MessageBox.Show("Please insert only letters in FullName.", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
fullNameTextBox.Focus();
}