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
Vincenzo BenfanteVincenzo Benfante 

Can transform an RTF field in mandatory???

I try to convert an RTF field, named Contenuto__c, in mandatory using the Validation Rules.

 

I try to use the command ISNULL, ISBLANK, LEN(Contenuto_c) = 0

but without positive results...

 

Where is the error?

Best Answer chosen by Admin (Salesforce Developers) 
Vincenzo BenfanteVincenzo Benfante

 I found the problem...

The spaces are converted in &nbsp; and the carriage return in <br \>.

If i don't write nothing in to the field the content is null.

If i write a series of spaces the content is &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

If i write a series of spaces and of carriage return the content is &nbsp;&nbsp;&nbsp;<br \>&nbsp;&nbsp;&nbsp;<br \>

 

Therefore the control must be made on &nbsp; and <br \> tags.

All Answers

MandyKoolMandyKool

Hi,

 

 

Try this one:

 

Error Condition Formula: Contenuto__c = ''
Error Message: Enter value for Rich Text Field

 

And It should work.

Vincenzo BenfanteVincenzo Benfante

Hi kulkarni. Thanks for reply!

 

Nothing...don't work!!!

 

And i don't know why!!!!!

 

 

MandyKoolMandyKool

Hi,

 

If you could paste the screenshot of your Validation Rule.

 

Meantime you can raise case with salesforce for the issue.. but I think we are missing something.

Vincenzo BenfanteVincenzo Benfante

This is the Validation Rule after your advice:

 

MandyKoolMandyKool

Hi,

 

If possible we can connect on skype my id(mandar19.kulkarni) and try to figure out whats wrong with validation rule.

Shivanath DevnarayananShivanath Devnarayanan

Hello,

 

I tried replicating the scenario, and for me the Validation Rule is firing ..

 

this is the Formula i Used

 

LEN (Test_RTF__c) == 0

 

But The thing i noticed was , the RTF validation Fires only finally, i.e. after all "other" validations are corrected

 

 

Hope this helps!

 



Vincenzo BenfanteVincenzo Benfante

 I found the problem...

The spaces are converted in &nbsp; and the carriage return in <br \>.

If i don't write nothing in to the field the content is null.

If i write a series of spaces the content is &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

If i write a series of spaces and of carriage return the content is &nbsp;&nbsp;&nbsp;<br \>&nbsp;&nbsp;&nbsp;<br \>

 

Therefore the control must be made on &nbsp; and <br \> tags.

This was selected as the best answer