TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Indra Kumar S
NA
25
47k
regards validation in phone number
Aug 10 2015 6:46 AM
Hi i am using following code for phone number validations, after 10 digits it will display error message "Please enter only 10 digits" but after 10 digits if we enter number means it will add number so please help me this textbox must not add number after 10 digits.
private void txtcontactno_TextChanged(object sender, EventArgs e)
{
if (System.Text.RegularExpressions.Regex.IsMatch(txtcontactno.Text,@"^([0-9]{1,10})$"))
{
//MessageBox.Show("match pattern");
// Do something here
}
else
{
MessageBox.Show("Please enter only 10 digits");
txtcontactno.Focus();
}
}
Reply
Answers (
5
)
Multiple selection of rows is not working - Windows form App
tablodaki verilerim listelenmiyor