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

  • SEARCH
  • Home
  • 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 3595970
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T19:55:21+00:00 2026-05-18T19:55:21+00:00

I want to modify the custom validator below so it checks that the RadEditor

  • 0

I want to modify the custom validator below so it checks that the RadEditor is not empty OR doesn’t only contain HTML tags like br and p tag , etc..there HAS to be some Text in it and not just HTML tags. How do I achieve what I want ?

<asp:CustomValidator runat="server" ID="CustomValidator1" ControlToValidate="RadEditor1" ClientValidationFunction="checkLength">* The text length should not exceed 50 symbols.</asp:CustomValidator>  
<script type="text/javascript">  
    var limitNum = 50;  

    function checkLength(sender, args)  
    {  
        //Note that sender is NOT the RadEditor. sender is the <span> of the validator. 
        //The content is contained in the args.Value variable     
        var editorText = args.Value; 
        args.IsValid = editorText.length < limitNum;  
    } 

The things is when I use required field validator with the RadEditor, br tag is stored as a value and hence validation fails. So how do I write a custom validator that checks that editor doesnt only have html tags in it??

  • 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-05-18T19:55:22+00:00Added an answer on May 18, 2026 at 7:55 pm

    Using jQuery it’s as simple as this:

    args.IsValid = $(editorText).text().length < limitNum; 
    

    The text method of jQuery will remove all tags and leave you with the “pure text” only.

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

Sidebar

Related Questions

I want to modify the custom validator below so it checks that the RadEditor
i want to modify entries in custom plist file programmatically. can anybosy suggest me
I'm setting up CruiseControl.NET and during the build I want to modify my version.txt
I want to know I can dynamically modify an existing Crystal Report (using C#
How do you modify a propertygrid at runtime in every way? I want to
I am have written the following code below to encode a bitarray into custom
I want to modify the way pages are listed in the navigation, particularly the
I've got a Silverlight 4 custom control that basically is several Canvas elements wrapped
I have a situation where I have an xml file that I don't want
There are many tools out there some free and some not that offer a

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.