CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2001
    Posts
    157

    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

  2. #2
    Join Date
    Aug 2004
    Posts
    24

    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

  3. #3
    Join Date
    Mar 2005
    Posts
    5

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured