Symptom
The business rule has been configured to validate special characters, but an error message is not being triggered when validating a text box field with multiple lines of text.
Image / Data in this KBA is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental.
.
Environment
- SAP SuccessFactors Employee Central
- SAP SuccessFactors Metadata Framework
Reproducing the Issue
- Access the object or the employee where you have this field.
- Add a text in the first line.
- Add another text in the second line with the special character that should trigger the rule.
- See that the error message was not triggered.
Resolution
For a text box field the regular expression consider only the first text line but to consider all the text add "(?)" in your regular expression.
Please see the comparation below:
- For a single text like the regular expression will be: .*[!,@,#,$,%,^,&,*,(,),_,+,=,{,},",?,\,;,:,<,>].* (for more details on this, please refer to KBA 2691521);
- For a text box, add the expression (?) like in regular expression: (?s).*[!,@,#,$,%,^,|,&,*,(,),_,+,=,{,},",?,\,;,:,<,>].*
Please refer below to an image of how the rule should be configured:
See Also
2691521 - How to Create a Rule to Raise an Error Message When Special Characters are Entered in a Field
Keywords
XAF-26678, business rule, error message, special characters, validation, text box field, One line, multiple line, text line, considered, rule not working error, No validaton, No error message, multiple line of text , KBA , LOD-SF-EC-JOB-RUL , Job Info Business Rules , LOD-SF-EC , Employee Central , LOD-SF-MDF-RUL , Custom Oject based Business Rules , How To
SAP Knowledge Base Article - Public