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
VDid.ax1020VDid.ax1020 

Validation to stop carriage returns from being enter in fields in SF

Hi,

 

I have been trying to figure out how to stop users from entering carriage returns in fields within salesforce.com. Does anyone know how to do this? Is it even possible? Below is my code.

 

Thanks!

V

 

CONTAINS( Description__c , '')

JitendraJitendra

Hi,

This should work

 

REGEX(Description__c, "([^\\n]*\\n+)+")

 

VDid.ax1020VDid.ax1020

Hi Jitendra,

 

This solution did not work. I was able to save the description with a carriage return in it.

 

Thanks,

V

charu_dattacharu_datta

Hi,

 

I need to validate a text field for carriage returns. Has anybody implemented a Regex solution.

 

@ Jitendra I tried your solution but somehow did not work

:)

Thanks in advance.