Skip to main content

Validating Company NI or SSN

Entering an employees national insurance number and it's showing invalid.

J
Written by Joshua Shooter
Updated over 2 months ago

Format validator, regex code, regular expression - known as many different things, but what does it do?

People® allows you to add a regex code in the NI/SSN field setting so that you can specify a format in which you wish an NI/SSN to be entered within an employee's record.

Here's an example of what code you wish to use:

  • UK NI number validation: ^([a-zA-Z]){2}( )?([0-9]){2}( )?([0-9]){2}( )?([0-9]){2}( )?([a-zA-Z]){1}?$

  • USA SSN validation: ^(\d{3}-?\d{2}-?\d{4}|XXX-XX-XXXX)$

To input a regex code:

  1. Click Access Button image then click HR Admin.

  2. Click the Company tab then the NI/SSN validator field.

From here, if a number is entered that does not fit the specified format, an error message will appear.

If the validation is blank, no validation is done.

Did this answer your question?