2439957 - How to use custom National Insurance Number format

SAP Knowledge Base Articles - public

2439957 - How to use custom National Insurance Number format


In standard panel, the validation for National insurance number is as follows.

  • "National Insurance Number should be two prefix letters, six digits, and one suffix letter" which does not consider spaces.
  • But in EC the format is validated with spaces as follows. AA NN NN NN A; the last character can only be A, B, C or D which is not considered in the standard condition.

So customer has built a custom panel as per the EC field validation (AA NN NN NN A). When employee signs the form, the form does not captures the whole NIS number 


SAP SuccessFactors Onobarding - Panel


Standard Key is used on field for custom panel.


To fix the issue: 

  1. Open the Onboarding Process - Panel and check the key (In this case the panel is custom panel with standard key)
  2. Copy the key as it is and place in a note pad to be used later


3. Create a custom key and Remove the (no spaces) from the field title. Save


4. Add a validator to the field


5. Set the regular expression accordingly to the country in this case GRB "^[A-Za-z]{2} \d{2} \d{2} \d{2} [ABCDabcd]{1}$"


6. Add required Validator


7. At this point the Validation works properly. So customer needs to use the custom key e.g cust_UK_StarterChecklist_NIS  in mapping between ONB and EC.

8. As we still need to have the use of the standard key without space we create a "fake field". This field will be hidden never showing during the process.

9. Create a TextBox field and use standard key.

10. Set an advanced Condition that will never match. We choose - Age Equal  Do not Delete.


11. Need to copy value from  the "nino standard do not delete" field to "National Insurance Number field" and remove space.

12. Select "National Insurance Number field" and create one more Validator - Custom Expression Validator


Code to Custom Validation " context.SAP_UK_StarterChecklist_NIS.value=context.control.value.replace(' ','').replace(' '.'').replace(' ','').replace(' ','')

 return true "

13. Test and you see that the custom field now has the format "AA 11 22 33 B"

See Also

 2424329 - UK: Change on deep validation of social security number NINO number


Deep Validation NINO number National Insurance Number Social security number Custom Key Standard Security Number Key , KBA , LOD-SF-OBD-PAN , Panels, Panel Designer , How To


SAP SuccessFactors Onboarding 1608 ; SAP SuccessFactors Onboarding 1611 ; SAP SuccessFactors Onboarding 1702