SAP Knowledge Base Article - Public

2711979 - Business Rule Function Matches() not working in text box fields

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.

KB3.jpg

KB4.jpg

Environment

SAP SuccessFactors Employee Central (EC) - All Versions

Reproducing the Issue

  1. Access the object or the employee where you have this field.
  2. Add a text in the first line.
  3. Add another text in the second line with the special character that should trigger the rule.
  4. 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:

  1. For a single text like the regular expression will be:  .*[!,@,#,$,%,^,&,*,(,),_,+,=,{,},",?,\,;,:,<,>].* (for more details on this, please refer to KBA 2691521);
  2. 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:

KB1.jpg

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-RUL , Business Rules & Event Derivation , How To

Product

SAP SuccessFactors HCM Core 1808