Invalid CompaniesHousePersonalCode format

We are occassionally seeing the following error when attempting to submit a new Company Incorporation.

Invalid CompaniesHousePersonalCode format

There is no regular expression pattern in the XSD schema, so I wondered if this is truly a formatting error with the Personal Code?

Does this error instead indicate a mismatch in the supplier name and DOB vs that which the personal code is assigned to? Are these checks done at the point of submission or are they done post-submission?

Thanks

Just a heads up in case you weren’t aware, there is a separate XML forum here: https://xmlforum.companieshouse.gov.uk/

There’s been at least one post along similar lines with a response from Simon, althought that was specifically regarding CS01s: Is there any way to validate UIDs - Invalid CompaniesHousePersonalCode format - Confirmation Statement (New Annual Return) - Companies House XML Gateway Forum

As far as I’m aware there’s no kind of checksum or regex style validation beyond 11 alphanumerics (with all letters being capital). Most seem to be in the format of five or six letters followed by six or five numbers, but this does vary. We’ve had one that was ten letters and one number (thrilling stuff!)

If it’s any help we haven’t encountered this error in 100+ formations, although we have had a couple of rejections for incorrect code. These are standard rejections with a message: The identity verification details provided for the director XXXXX were not correct. Before you try again, you should check that you have the right Companies House personal code, and make sure their details on the Companies House register…

This suggests that validation of the code against the individual is post-submission, and the errors you are getting are… not sure actually!

The only other thing I can think of that might be worth checking is when we’ve encountered similar errors in the past, it’s not related to the formatting of the data, but either order or existence of the field in question (with the error message being bit misleading). So invalid XYZ format sometimes means “I was expecting XYZ here but got something else instead” or even “I was not expecting XYZ here”. Although if yoiu’re generating XML systematically and the error is only occasionaly, that probably wouldn’t make sense unless there was a common factor in all the ones that are failing (thinking along the lines of something like code inserting a blank ID block for Corporate Appointments or something like that).

In fact the more I think about the more I seem to recall that pretty much every time we’ve had “invalid format” errors after a schema update it’s been related to a field being included when it shouldn’t, or not being included where it was expected, and nothing to do with the formatting itself!

If you are in a position to share redacted incorporation XML for one that failed, either here or by DM I’d be happy to have a look and see if I can spot anything.

1 Like

I didn’t know about the XML forum, that could prove to be very useful, thank you.

In this particular case it later transpired that the accountant had copied the code from a low resolution screen shot and miskeyed something. :man_facepalming: