How to create the custom validation control for telephone number?
Hi,
I need create a custom validation control for telephone number. The telephone number is three text boxes combination. for example, (555)555-5555.
Thanks
Re: How to create the custom validation control for telephone number?
Why Custom Validator,
How about using Regular Expression Validator.
Drag Regular Expression Validator,
then go to Validation Expression and select three dots that opens up the dialog box with default validation. Phone number should be in there.
Cheers,
Marker
Re: How to create the custom validation control for telephone number?
Hi,
As you are using 3 texboxes so you can use regularexpression for it check that the given input is digit. The ValidationExpression property of first two regular expression validator will have this value .. "^[0-9]{3}" and last will have this value "^[0-9]{4}". (You can modify according your checking condition)
Regards,
Prachi