+ Start a Discussion
sai.sfsai.sf 

minimum character limit on rich text area field

Hi,

 

     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}" />

 

Thanks

nickwick76nickwick76

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

sai.sfsai.sf

can we do it at client side using javascript or jquery

sfdcfoxsfdcfox

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.