Masked Edit Box - What's the difference

  • Thread starter Thread starter Zim Babwe
  • Start date Start date
Z

Zim Babwe

In VB.NET 2005, if I have a masked edit box with the mask of (999) 000-0000,
doesn't the 9 represent an optional entry and a zero represent a required
entry?

Why then if I enter (213) 234-

am I allowed to leave off the last four digits of the phone number?

Thanks
 
In VB.NET 2005, if I have a masked edit box with the mask of (999) 000-0000,
doesn't the 9 represent an optional entry and a zero represent a required
entry?

Why then if I enter (213) 234-

am I allowed to leave off the last four digits of the phone number?

Thanks

As I recall, before you process your form data, check to see if it's
valid. I think there's a ValidateText procedure.
I found some more information here: http://msdn2.microsoft.com/en-gb/
library/system.windows.forms.maskedtextbox.validatetext.aspx
 
Thanks for the link. I was wondering if I had to validate on exit but I
thought the 0's took care of it.
 
I thought it was the other way around. 9 was required and 0 was not. Have
you tried that just to see if it will work?

Robin S.
 
Back
Top