We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

httpRuntime + asp:RequiredFieldValidator

Dear,

when I have a TargetFramwork in the httpRuntime tag in Web.config, pages with an asp:RequiredFieldValidator do not render properly.

Web.config:
<httpRuntime targetFramework="4.6" requestValidationMode="2.0"/>

ASPX:
    <ej:Tab ID="tabNewOrder" runat="server" HeaderPosition="Top" AllowKeyboardNavigation="True">
        <Items>
            <ej:TabItem ID="tabStart" Text="Start">
            </ej:TabItem>
                    <ej:TabItem ID="tabOptions" Text="Finish">
                        <ContentSection>
                            <div class="form-group">
                                <div class="col-md-12">
                                    <div class="input-group">
                                        <ej:MaskEdit ID="txtPurchaseOrderNumber" runat="server" Width="300px" Height="40px" WatermarkText="PO Number" />
                                    </div>
                                    <asp:RequiredFieldValidator ID="rfvPurchaseOrderNumber" runat="server" ValidationGroup="insOrder"
                                        ErrorMessage="*PO Number Required*" SetFocusOnError="true" ControlToValidate="txtPurchaseOrderNumber" Display="Dynamic"                                    CssClass="text-danger" />
                                    <asp:RegularExpressionValidator ID="revPurchaseOrderNumber" runat="server" ValidationGroup="insOrder"
                                        ValidationExpression="^([0-9a-zA-z.\-\'\s]{1,50})$" ErrorMessage="*Max length 50 - only numbers or alphabets.*"
                                        ControlToValidate="txtPurchaseOrderNumber" Display="Dynamic" CssClass="text-danger" />
                                </div>
                            </div>
                        </ContentSection>
                    </ej:TabItem>
            </Items>
    </ej:Tab>

I can remove the targetFramework from httpRuntime and then the control works, but that gives problems in other modules (like Owin.Security.Providers.LinkedIn that stops working).

Is there a workaround?
Peter

1 Reply

KR Keerthana Rajendran Syncfusion Team November 19, 2019 01:17 PM UTC

Hi Peter, 
 
Good day to you. 
 
We have checked the reported issue in our end with the provided code. We have set target framework as 4.6 for httpRuntime in Web.config as mentioned in your update. But validation works fine in our end. We have attached a sample based on your code in the below link 
 
 
Please check the above sample and get back to us with the following details to proceed further. 
 
1)     Whether you get any console errors? 
2)     Product version in which you get this issue.  
3)     If possible, modify the above sample to replicate the issue else provide a video on the issue. 
 
Regards, 
Keerthana.  


Loader.
Up arrow icon