Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7947821
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T01:32:33+00:00 2026-06-04T01:32:33+00:00

I have a RequiredFieldValidator. The code is below: <asp:TextBox runat=server ID=phone MaxLength=10 Columns=10 Width=90px></asp:TextBox>

  • 0

I have a RequiredFieldValidator. The code is below:

 <asp:TextBox runat="server" ID="phone" MaxLength="10" Columns="10" 
                            Width="90px"></asp:TextBox>
                        <asp:MaskedEditExtender ID="phone_MaskedEditExtender" runat="server" CultureAMPMPlaceholder=""
                            CultureCurrencySymbolPlaceholder="" CultureDateFormat="" CultureDatePlaceholder=""
                            CultureDecimalPlaceholder="" CultureThousandsPlaceholder="" CultureTimePlaceholder=""
                            Enabled="True" TargetControlID="phone" Mask="(999)999-9999" ClearMaskOnLostFocus="False">
                        </asp:MaskedEditExtender>
                        <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidatorPhone" ControlToValidate="phone"
                            ErrorMessage="Phone is required." Display="Dynamic" InitialValue=""  />

If I remove the asp:MaskedEditExtender, the RequiredFieldValidator functions as expected. Otherwise it seems the validator loses its functionality.

Why?
Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T01:32:35+00:00Added an answer on June 4, 2026 at 1:32 am

    Your MaskedEditExtender isn’t doing anything but declaring a mask, and putting itself in the place of the value of your input.

    All those Cultures are not needed in the case of a phone number.

    What is the validation expression?

    The whole point of the MaskedExtender is to control the input type. If you are using ASP you can do this by pulling from database and restricting the max length of the field.

    Here is an example.

    <cc1:MaskedEditExtender  ID="MaskedEditExtender1" 
                         runat="server"
                         TargetControlID="txtClientLookupValue"
                         Mask="999999-9999"
                         ClearMaskOnLostFocus="false"> 
    </cc1:MaskedEditExtender>
    
    <cc1:MaskedEditValidator ID="MaskedEditValidator1" 
                         ControlExtender="MaskedEditExtender1"
                         runat="server"
                         ControlToValidate="txtClientLookupValue"
                         IsValidEmpty="True" 
                         InvalidValueMessage="INVALID"
                         ValidationExpression="^[2-9][0-9][0-9][0-9][0-9][0-9]-[0-9][0-9][0-9][0-9]$"
                         Display="Dynamic">    
    </cc1:MaskedEditValidator>
    

    And here is a reference:

    MaskedEditExtenderLinkASP

    Good Luck.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

<asp:GridView ID=GridView1 runat=server AutoGenerateColumns=false Height=146px Width=308px> <Columns> <asp:TemplateField HeaderText=Original Price ControlStyle-Width=100px> <ItemTemplate> <asp:TextBox ID=txtOriginalPrice
Here is a part of my code: <asp:ListBox ID=lbRD runat=server DataSourceID=RDSqlDataSource onchange=JSFillDetail(); DataTextField=Описание DataValueField=ID
I have a RadioButtonLIst as follows: <asp:RadioButtonList runat=server ID=Location ValidationGroup=formVal> <asp:ListItem Value=Beverly Hills />
I have a check box, RequiredFieldValidator and textbox that have editmask extender I want
I have 2 asp.net textboxes in an update panel. Both textbox controls have some
I have an ASP.NET TextBox ID=txtDate in my usercontrol. It has ValidationGroup=MyUC set. Now
I have created a custom TextBox control which also contains a RequiredFieldValidator. Everything works
I am using RequiredFieldValidator in my asp.net program. I have a sign out button
I have set the RangeDateValidator in the code behind as shown below, and even
I have the below error message in my asp.net website when i replaced the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.