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. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

RTE validation does not work in the same form together with ordinary TextBox

Thread ID:

Created:

Updated:

Platform:

Replies:

127401 Nov 14,2016 08:51 AM UTC Nov 15,2016 01:48 PM UTC ASP.NET Core 1
loading
Tags: RichTextbox
Ardani
Asked On November 14, 2016 08:51 AM UTC

Hi,

I got rte validation for storing forum post content working on clientside, then I added an ordinary textbox to act as subject.

After adding the textbox the rte validation stops working.

Please see my code attached.

Many Thanks

Attachment: txtbox_and_rtevalidation_3b024167.zip

Prince Oliver [Syncfusion]
Replied On November 15, 2016 01:48 PM UTC

Hi Amirmansoor, 
 
Thanks for contacting Syncfusion support. 
 
We have prepared a sample using the code you shared. It seems that you have used asp validation for textbox and jQuery validation for RTE control. Since you have used both validation, jQuery validation rules overrides the instance of asp form validation rules and Hence textbox is not validated. We suggest you to use same validation for both the controls to avoid this issue. Have a look at the following code snippet. 
 
<form asp-controller="Forum" asp-action="ReplyToPost" method="post" id="postreplyform"> 
    <div class="form-group"> 
        <label asp-for="Subject"></label> 
        <div class="col-md-10"> 
            <input asp-for="Subject" class="form-control" /> 
            <span asp-validation-for="Subject" class="text-danger"></span> 
        </div> 
    </div> 
    <div class="form-group"> 
        <label asp-for="postreplyrte" class="col-md-2 control-label"></label> 
        <div class="col-md-10"> 
            <ej-rte id="postreplyrte" ej-for="postreplyrte" allow-editing="true"> 
            </ej-rte> 
            <span asp-validation-for="postreplyrte" class="text-danger"></span> 
        </div> 
    </div> 
    <input name="topicidin" type="hidden" value="@ViewData["TopicId"]" /> 
    <div class="form-group"> 
        <div class="col-md-offset-2 col-md-10"> 
            <button type="submit" class="btn btn-default">Post</button> 
        </div> 
    </div> 
</form> 
 
We have attached the sample for your convenience. 
Refer to the following link for sample: 
 
Regards, 
Prince 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;