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
Vivek S 42Vivek S 42 

Invalid Regex Runtime Exceed for

Hi,

I have a validation rule to throw error when no. of lines in address more than 4, 
and another one for each line not to have more than 35 char.

both are working fine except in one case, where all the 4 lines with 35 char is trying to save. and i am getting the error as 
 Invalid (Regular expression runtime exceeded for: (.*\r\n.*){4,})

where as (.*\r\n.*){4,} is from my validation rule. pls help me out. 

validation rule for no. of lines (regex( MailingStreet , "(.*\r\n.*){4,}")
SandhyaSandhya (Salesforce Developers) 
Hi,

Please refer below links for similar discussion.

http://salesforce.stackexchange.com/questions/148199/need-help-in-using-regular-expressions-in-validation-rules
 
http://salesforce.stackexchange.com/questions/76854/validation-rule-to-count-words
 
Hope this helps you!

If this helps you,mark it as solved.

Thanks and Regards
Sandhya