Masked Edit Box - What's the difference

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
 
L

lord.zoltar

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
 
Z

Zim Babwe

Thanks for the link. I was wondering if I had to validate on exit but I
thought the 0's took care of it.
 
R

RobinS

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top