From 9296486b9f4258a8dba15e656f06c2b5a42a88d6 Mon Sep 17 00:00:00 2001 From: Guy Calloway Date: Tue, 13 May 2025 08:20:41 +0000 Subject: [PATCH] feat(schema): Add validation pattern for industry-code Add JSON schema validation for industry code field requiring: - At least one alphanumeric character anywhere in the string - Minimum length of 1 character - Allows any other characters including whitespace Pattern added: `[a-zA-Z0-9]` --- build/accounts-statement-schema.json | 4 +++- build/alternate-registration-schema.json | 4 +++- build/company-schema.json | 4 +++- build/control-statement-schema.json | 4 +++- build/filing-schema.json | 4 +++- build/gazette-notice-schema.json | 4 +++- build/licence-schema.json | 4 +++- build/register-entry-schema.json | 4 +++- build/sanctioned-entity-schema.json | 4 +++- build/subsequent-registration-schema.json | 4 +++- build/supplier-relationship-schema.json | 4 +++- build/trademark-registration-schema.json | 4 +++- schemas/includes/industry-code.json | 4 +++- 13 files changed, 39 insertions(+), 13 deletions(-) diff --git a/build/accounts-statement-schema.json b/build/accounts-statement-schema.json index 6ba76eed..d76f7ca7 100644 --- a/build/accounts-statement-schema.json +++ b/build/accounts-statement-schema.json @@ -887,7 +887,9 @@ "type": "string" }, "code": { - "type": "string" + "type": "string", + "minLength": 1, + "pattern": "[a-zA-Z0-9]" }, "code_scheme_id": { "type": "string", diff --git a/build/alternate-registration-schema.json b/build/alternate-registration-schema.json index 45e08149..1350f5c6 100644 --- a/build/alternate-registration-schema.json +++ b/build/alternate-registration-schema.json @@ -797,7 +797,9 @@ "type": "string" }, "code": { - "type": "string" + "type": "string", + "minLength": 1, + "pattern": "[a-zA-Z0-9]" }, "code_scheme_id": { "type": "string", diff --git a/build/company-schema.json b/build/company-schema.json index 498858be..4ed0a406 100644 --- a/build/company-schema.json +++ b/build/company-schema.json @@ -629,7 +629,9 @@ "type": "string" }, "code": { - "type": "string" + "type": "string", + "minLength": 1, + "pattern": "[a-zA-Z0-9]" }, "code_scheme_id": { "type": "string", diff --git a/build/control-statement-schema.json b/build/control-statement-schema.json index 851a0b86..9cc0268c 100644 --- a/build/control-statement-schema.json +++ b/build/control-statement-schema.json @@ -1083,7 +1083,9 @@ "type": "string" }, "code": { - "type": "string" + "type": "string", + "minLength": 1, + "pattern": "[a-zA-Z0-9]" }, "code_scheme_id": { "type": "string", diff --git a/build/filing-schema.json b/build/filing-schema.json index 9fc7938c..e798bc17 100644 --- a/build/filing-schema.json +++ b/build/filing-schema.json @@ -811,7 +811,9 @@ "type": "string" }, "code": { - "type": "string" + "type": "string", + "minLength": 1, + "pattern": "[a-zA-Z0-9]" }, "code_scheme_id": { "type": "string", diff --git a/build/gazette-notice-schema.json b/build/gazette-notice-schema.json index c3414c41..6973e5f1 100644 --- a/build/gazette-notice-schema.json +++ b/build/gazette-notice-schema.json @@ -1441,7 +1441,9 @@ "type": "string" }, "code": { - "type": "string" + "type": "string", + "minLength": 1, + "pattern": "[a-zA-Z0-9]" }, "code_scheme_id": { "type": "string", diff --git a/build/licence-schema.json b/build/licence-schema.json index 6be8bfc4..2d26c61c 100644 --- a/build/licence-schema.json +++ b/build/licence-schema.json @@ -819,7 +819,9 @@ "type": "string" }, "code": { - "type": "string" + "type": "string", + "minLength": 1, + "pattern": "[a-zA-Z0-9]" }, "code_scheme_id": { "type": "string", diff --git a/build/register-entry-schema.json b/build/register-entry-schema.json index 4a2db65a..d41613a0 100644 --- a/build/register-entry-schema.json +++ b/build/register-entry-schema.json @@ -295,7 +295,9 @@ "type": "string" }, "code": { - "type": "string" + "type": "string", + "minLength": 1, + "pattern": "[a-zA-Z0-9]" }, "code_scheme_id": { "type": "string", diff --git a/build/sanctioned-entity-schema.json b/build/sanctioned-entity-schema.json index c8236aea..2bcb58d9 100644 --- a/build/sanctioned-entity-schema.json +++ b/build/sanctioned-entity-schema.json @@ -293,7 +293,9 @@ "type": "string" }, "code": { - "type": "string" + "type": "string", + "minLength": 1, + "pattern": "[a-zA-Z0-9]" }, "code_scheme_id": { "type": "string", diff --git a/build/subsequent-registration-schema.json b/build/subsequent-registration-schema.json index 7caadeb3..cb635a7a 100644 --- a/build/subsequent-registration-schema.json +++ b/build/subsequent-registration-schema.json @@ -798,7 +798,9 @@ "type": "string" }, "code": { - "type": "string" + "type": "string", + "minLength": 1, + "pattern": "[a-zA-Z0-9]" }, "code_scheme_id": { "type": "string", diff --git a/build/supplier-relationship-schema.json b/build/supplier-relationship-schema.json index 4a988b84..1f1e6083 100644 --- a/build/supplier-relationship-schema.json +++ b/build/supplier-relationship-schema.json @@ -791,7 +791,9 @@ "type": "string" }, "code": { - "type": "string" + "type": "string", + "minLength": 1, + "pattern": "[a-zA-Z0-9]" }, "code_scheme_id": { "type": "string", diff --git a/build/trademark-registration-schema.json b/build/trademark-registration-schema.json index 9eb7e62f..c9cdc930 100644 --- a/build/trademark-registration-schema.json +++ b/build/trademark-registration-schema.json @@ -906,7 +906,9 @@ "type": "string" }, "code": { - "type": "string" + "type": "string", + "minLength": 1, + "pattern": "[a-zA-Z0-9]" }, "code_scheme_id": { "type": "string", diff --git a/schemas/includes/industry-code.json b/schemas/includes/industry-code.json index 4db2d93f..9bf69ad9 100644 --- a/schemas/includes/industry-code.json +++ b/schemas/includes/industry-code.json @@ -7,7 +7,9 @@ "type": "string" }, "code": { - "type": "string" + "type": "string", + "minLength": 1, + "pattern": "[a-zA-Z0-9]" }, "code_scheme_id": { "type": "string",