Discussion in 'OT Technology' started by anfrey, Oct 22, 2004.
i need to make a validation program. for a telephone number.
uhhh okay - what do you want to validate? If it is in the correct format xxx-xxx-xxxx. If it is a legal number? (would require a nanpa database)
Why do you need to make it?
i'm in putting a 12 char string into a textbox. in the form xxx-xxx-xxxx.... the only other thing in the form is a button. clicking the button should check if the dashes are in the right positions, divide the number into 3 substrings and check the 3 substrings for IsNumeric() = true. then popup a dialog saying whether it's a valid number or not. if it is, then it'll display the nubmer without dashes. if it's not, then it'll state why (dashes wrong, non-numeric charactrs, etc)