function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

minimum character limit on rich text area field



     Is there any way to have minimum character limit on rich text area field (say min 200 characters).I have this field on visualforce page.

<apex:inputField value="{!Candidate__c.Resume__c}" />




I don't know of any VF-functionality that can help you with this, but you should be able to do this check in Apex, i.e. in the controller or extension before saving. And if the number of characters is less than 200 you add an error message to PageMessages component.


// Niklas


can we do it at client side using javascript or jquery


You can do it with JavaScript or jQuery, certainly. You can use a keypress handler to indicate how many characters are left, and you can use a form submit handler to suppress any form submission where the user does not meet the minimum character requirement.