How to validate Textbox telephone Number filed using jquery or Javascript

Chinu007
Chinu007 used Ask the Experts™
on
hello Friends,

I have two textboxes in my view. one is Telephone number

but right now my text box code as something like this..

I need?

1) I need to limit up to 10 numbers 2) I need to make like the way textbox user can enter area code very clearly?

here is my code.

<td class="style1">
                    <div class="float">
                        <%= Html.TextBoxFor( x => Model.SelectedAccount.AccountKeyContactPhone,new { size = "12" }  ) %>
                        *
                        <%= Html.ValidationMessageFor( x => x.SelectedAccount.AccountKeyContactPhone, " " )%>
                    </div>
                    <div class="float">
                        &nbsp;Ext:
                        <%= Html.TextBoxFor( x => Model.SelectedAccount.AccountKeyContactPhoneExt,new { size = "5" } ) %>
                        <%= Html.ValidationMessageFor( x => x.SelectedAccount.AccountKeyContactPhoneExt, " " )%>
                    </div>
                </td>
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Multitechnician
Top Expert 2014
Commented:

Author

Commented:
awesome thanks I was searching exactly like this..
leakim971Multitechnician
Top Expert 2014

Commented:
You're welcome! Thanks for the points!

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial