+ 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.