diff --git a/content_schemas/dist/formats/content_block_pension/notification/schema.json b/content_schemas/dist/formats/content_block_pension/notification/schema.json index 97d924c65..b2da1036c 100644 --- a/content_schemas/dist/formats/content_block_pension/notification/schema.json +++ b/content_schemas/dist/formats/content_block_pension/notification/schema.json @@ -403,7 +403,7 @@ "properties": { "amount": { "type": "string", - "pattern": "£[0-9]+\\.[0-9]+" + "pattern": "^£{1}[1-9]{1,3}(,\\d{3})*(\\.\\d{2})?" }, "cadence": { "type": "string", diff --git a/content_schemas/dist/formats/content_block_pension/publisher_v2/schema.json b/content_schemas/dist/formats/content_block_pension/publisher_v2/schema.json index 07bcd3b69..c5c2a9ec3 100644 --- a/content_schemas/dist/formats/content_block_pension/publisher_v2/schema.json +++ b/content_schemas/dist/formats/content_block_pension/publisher_v2/schema.json @@ -220,7 +220,7 @@ "properties": { "amount": { "type": "string", - "pattern": "£[0-9]+\\.[0-9]+" + "pattern": "^£{1}[1-9]{1,3}(,\\d{3})*(\\.\\d{2})?" }, "cadence": { "type": "string", diff --git a/content_schemas/examples/content_block_pension/publisher_v2/example.json b/content_schemas/examples/content_block_pension/publisher_v2/example.json index ed0a0b1f7..5f804a734 100644 --- a/content_schemas/examples/content_block_pension/publisher_v2/example.json +++ b/content_schemas/examples/content_block_pension/publisher_v2/example.json @@ -13,6 +13,18 @@ "amount": "£221.20", "cadence": "a week", "description": "Your weekly pension amount" + }, + "rate-2": { + "name": "Rate without decimal point", + "amount": "£221", + "cadence": "a week", + "description": "Your weekly pension amount" + }, + "rate-3": { + "name": "Rate with big value", + "amount": "£1,223", + "cadence": "a week", + "description": "Your weekly pension amount" } } }, diff --git a/content_schemas/formats/content_block_pension.jsonnet b/content_schemas/formats/content_block_pension.jsonnet index b44afe7de..4e2ec9416 100644 --- a/content_schemas/formats/content_block_pension.jsonnet +++ b/content_schemas/formats/content_block_pension.jsonnet @@ -14,7 +14,7 @@ local utils = import "shared/utils/content_block_utils.jsonnet"; { amount: { type: "string", - pattern: "£[0-9]+\\.[0-9]+", + pattern: "^£{1}[1-9]{1,3}(,\\d{3})*(\\.\\d{2})?", }, cadence: { type: "string",