I do it for one of my application..see it..i wish it will help you..customize it as your wish..
if (!validateInput(autoCompleteBox1.Text, @"^[0-9]\d{1}/[0-9]\d{1}/\d{4}$", "Birthday format isn't correct! Follow day/month/year(ex. 01/01/1990) format.."))
autoCompleteBox1.Focus();
else
{
Messagebox.show("Your Birthday saved successfully..");
}
public bool validateInput(string input,string expression,string message)
{
bool valid = Regex.Match(input,expression).Success;
if (!valid)
{
MessageBox.Show(message, "Invalid Input", MessageBoxButton.OK);
}
return valid;
}