Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void txtTelefon_Leave(object sender, EventArgs e)
- {
- String t = @"\+381\W\d{2}\W\d{6,7}";
- //match + 3digits space 2digits space 7digits
- Regex r = new Regex(t);
- Match m = r.Match(txtTelefon.Text);
- if (!m.Success)
- {
- MessageBox.Show("Pogresno unet broj!", "Obavestenje",
- MessageBoxButtons.OK, MessageBoxIcon.Information);
- txtTelefon.SelectAll();
- txtTelefon.Focus();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement