SAP Knowledge Base Article - Public

2645388 - Validate Field Length

Symptom

  • How to format a custom field to be of a specific number of Characters and Numbers? For example National Id Number added under job information
  • How can we ensure the number of digits enter are exact?  For example 12 digits only.

Environment

SAP SuccessFactors Employee Central - Business Rules

Reproducing the Issue

  1. Create a custom field.
  2. Ensure the an error is thrown if the format entered is incorrect
  3. Ensure the value entered is of the required length

Resolution

  • To set the format of the field please follow this article 242652.
  • To raise an error message if the value entered is not of the required length.
  • Please configure the IF CONDITION  as indicated below or add this to existing rule (created to ensure the value entered is of the required format- see article 2426526).

filed length.jpg

Note: The Base Object of the rule should be the one where the custom field was added (in this example, Organization Information).

Raise the ERROR MESSAGE in the Then part.

See Also

2426526 - How to use a Business Rule to apply a Format/Regular Expression to a Field

2604562 - Maximum Number of Characters in the Object Text Field

Keywords

Field, Length, Format, limit the character, length of character, business rule, format, Validate the field length. , KBA , LOD-SF-EC-JOB-RUL , Job Info Business Rules , LOD-SF-EC-PER-PRS , Personal Info - Config, Rules, RBP, UI , LOD-SF-EC , Employee Central , How To

Product

SAP SuccessFactors Employee Central all versions