[ { "name": "Companies House's own example of a plain England and Wales number", "args": ["02050399"], "expect": { "valid": true, "normalised": "02050399", "prefix": "", "jurisdiction": "england-wales", "companyType": "Company registered in England and Wales", "reason": null } }, { "name": "the same number with its leading zero dropped is padded back", "args": ["2050399"], "expect": { "valid": true, "normalised": "02050399", "prefix": "", "jurisdiction": "england-wales", "companyType": "Company registered in England and Wales", "reason": null } }, { "name": "Companies House's own Scottish example", "args": ["SC002180"], "expect": { "valid": true, "normalised": "SC002180", "prefix": "SC", "jurisdiction": "scotland", "companyType": "Company registered in Scotland", "reason": null } }, { "name": "lower case, spaced and short of its zeros", "args": ["sc 2180"], "expect": { "valid": true, "normalised": "SC002180", "prefix": "SC", "jurisdiction": "scotland", "companyType": "Company registered in Scotland", "reason": null } }, { "name": "a Northern Ireland company", "args": ["NI012345"], "expect": { "valid": true, "normalised": "NI012345", "prefix": "NI", "jurisdiction": "northern-ireland", "companyType": "Company registered in Northern Ireland", "reason": null } }, { "name": "an England and Wales LLP", "args": ["OC301234"], "expect": { "valid": true, "normalised": "OC301234", "prefix": "OC", "jurisdiction": "england-wales", "companyType": "Limited liability partnership", "reason": null } }, { "name": "a Scottish limited partnership", "args": ["SL012345"], "expect": { "valid": true, "normalised": "SL012345", "prefix": "SL", "jurisdiction": "scotland", "companyType": "Limited partnership", "reason": null } }, { "name": "an overseas company", "args": ["FC012345"], "expect": { "valid": true, "normalised": "FC012345", "prefix": "FC", "jurisdiction": "united-kingdom", "companyType": "Overseas company", "reason": null } }, { "name": "R0, the one prefix with a digit in it, for pre-partition Northern Ireland companies", "args": ["R0000123"], "expect": { "valid": true, "normalised": "R0000123", "prefix": "R0", "jurisdiction": "northern-ireland", "companyType": "Northern Ireland company (pre-partition)", "reason": null } }, { "name": "a two-letter prefix Companies House does not use", "args": ["XX123456"], "expect": { "valid": false, "normalised": null, "prefix": null, "jurisdiction": null, "companyType": null, "reason": "unknown-prefix" } }, { "name": "nine digits", "args": ["123456789"], "expect": { "valid": false, "normalised": null, "prefix": null, "jurisdiction": null, "companyType": null, "reason": "bad-length" } }, { "name": "a prefix followed by seven digits", "args": ["SC1234567"], "expect": { "valid": false, "normalised": null, "prefix": null, "jurisdiction": null, "companyType": null, "reason": "bad-length" } }, { "name": "a prefix with no digits", "args": ["LP"], "expect": { "valid": false, "normalised": null, "prefix": null, "jurisdiction": null, "companyType": null, "reason": "bad-length" } }, { "name": "a single letter is not a prefix", "args": ["S1234567"], "expect": { "valid": false, "normalised": null, "prefix": null, "jurisdiction": null, "companyType": null, "reason": "bad-format" } }, { "name": "letters in the middle of the number", "args": ["12AB3456"], "expect": { "valid": false, "normalised": null, "prefix": null, "jurisdiction": null, "companyType": null, "reason": "bad-format" } }, { "name": "all zeros is no company", "args": ["00000000"], "expect": { "valid": false, "normalised": null, "prefix": null, "jurisdiction": null, "companyType": null, "reason": "bad-format" } }, { "name": "a hyphen is not accepted", "args": ["SC-002180"], "expect": { "valid": false, "normalised": null, "prefix": null, "jurisdiction": null, "companyType": null, "reason": "bad-character" } }, { "name": "the empty string", "args": [""], "expect": { "valid": false, "normalised": null, "prefix": null, "jurisdiction": null, "companyType": null, "reason": "empty" } } ]