Companies House Format

Hello I wonder if anyone can help. I am using the Companies House Format validation check and it is failing any with reference commencing OE or SC for example. Is the check limited?

Best Answers

  • Josh Boxer
    Josh Boxer Administrator
    edited November 2 Answer ✓

    Hi Lynne

    The Function that validates UK Companies House IDs is one you can expand to see the logic it is using:

    image.png

    It uses Regular Expression (Regex) to check the allowed formats:
    ^(AC|FC|G[ENS]|I[CP]|LP|N[AFILOPRZ]|OC|R[C]?|S[ACFILOPRZ]|ZC)?\s?(0\d{7}|\d{8})$|^(CE|RC|SC|OC|SO)\s?(\d{6})$

    image.png

    'SC….' should return true unless there is something else causing it to fail, like the length. 'OE' (overseas entity) is I think a newer ID introduced by companies house. You could add it:

    ^(AC|FC|G[ENS]|I[CP]|LP|N[AFILOPRZ]|O[CE]|R[C]?|S[ACFILOPRZ]|ZC)?\s?(0\d{7}|\d{8})$|^(CE|RC|SC|OC|SO)\s?(\d{6})$

    Note that a search shows some other new codes:
    Companies House updated its registry and introduced new company number prefixes to accommodate new forms of legal entities. The primary company number prefix introduced is:
    • OE: Overseas Entity
    Other notable modern or less common prefixes:
    • FE: Further education or sixth form college corporations
    • PC: Protected Cell Companies
    • SG: Scottish qualifying partnerships

    We will try to get the Function updated at some point with these latest codes.

  • Josh Boxer
    Josh Boxer Administrator
    edited November 2 Answer ✓

    From your list in your comment. These are already included in the Regex: SP, FC, IC, IP, LP, NF, NI, SL

    These 4 are not: BR, CS, OE, RS
    BR: UK Establishment of an overseas company
    CS: Scottish Charity
    RS: Registered Society or Co-Op

    We will add these so that the 7 newly identified prefixes are included in future. Thanks

Answers

  • ^(AC|FC|G[ENS]|I[CP]|LP|N[AFILOPRZ]|OC|R[C]?|S[ACFILOPRZ]|ZC)?\s?(0\d{7}|\d{8})$|^(CE|RC|SC|OC|SO)\s?(\d{6})$ Morning Josh thank you for responding so quickly - above is what i can see in the expression, in my data I also had these prefix: SP, BR, CS, FC, IC, IP, LP, NF, NI, OE, RS, SL. I can add them in, thank you!

  • Hello, just wanted to let you know I found quite a few other records and have amended my criteria to:

    ^(AC|FC|G[ENS]|I[CP]|LP|N[AFILOPRZ]|OC|RC?|S[ACFILOPRZ]|ZC)?\s?(0\d{7}|\d{8})$|^(BR|CE|CS|FC|IC|IP|LP|NC|NF|NI|OC|OE|RC|RS|SC|SL|SO|SP)\s?\d{6}$|^(AC|ZC)\d{6}$|^IP\d{5}[A-Z]$|^RS\d{5}R$|^SP\d{4,5}R(S)?$