Symptom
You have configured one business rule to validate special characters following the KBA 2691521 but you have noticed that the error message is not being triggered is the rule is validating a text box field where you have more than one line to type the text.
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.
Cause
- Configuration Issue
Resolution
When you have a text box field you need to correct the regular expression to consider not only the first text line but all the text and you do this by adding "(?)" 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);
- If you have a text box, then you'll add the expression (?) like in this: (?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 , KBA , LOD-SF-EC-JOB-RUL , Job Info Business Rules , LOD-SF-MDF-RUL , Custom Oject based Business Rules , How To