From 073596c40c696c501fa3b9d20405aa1aacdc9050 Mon Sep 17 00:00:00 2001 From: Joshua Drumm <34111449+JoshingYou1@users.noreply.github.com> Date: Thu, 2 Nov 2023 18:40:59 -0400 Subject: [PATCH] Reduced address city max length to 30 characters (#809) --- dist/10-10EZ-schema.json | 6 +++--- dist/10-10EZR-schema.json | 6 +++--- dist/definitions.json | 2 +- package.json | 2 +- src/common/definitions.js | 4 ++-- test/common/definitions.spec.js | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/dist/10-10EZ-schema.json b/dist/10-10EZ-schema.json index ce02e1726..4629fefbc 100644 --- a/dist/10-10EZ-schema.json +++ b/dist/10-10EZ-schema.json @@ -1448,7 +1448,7 @@ "city": { "type": "string", "minLength": 1, - "maxLength": 51, + "maxLength": 30, "pattern": "^.*\\S.*" }, "postalCode": { @@ -1655,7 +1655,7 @@ "city": { "type": "string", "minLength": 1, - "maxLength": 51, + "maxLength": 30, "pattern": "^.*\\S.*" }, "postalCode": { @@ -1931,7 +1931,7 @@ "city": { "type": "string", "minLength": 1, - "maxLength": 51, + "maxLength": 30, "pattern": "^.*\\S.*" }, "postalCode": { diff --git a/dist/10-10EZR-schema.json b/dist/10-10EZR-schema.json index 69b5fa4d5..29b67bd70 100644 --- a/dist/10-10EZR-schema.json +++ b/dist/10-10EZR-schema.json @@ -271,7 +271,7 @@ "city": { "type": "string", "minLength": 1, - "maxLength": 51, + "maxLength": 30, "pattern": "^.*\\S.*" }, "postalCode": { @@ -478,7 +478,7 @@ "city": { "type": "string", "minLength": 1, - "maxLength": 51, + "maxLength": 30, "pattern": "^.*\\S.*" }, "postalCode": { @@ -801,7 +801,7 @@ "city": { "type": "string", "minLength": 1, - "maxLength": 51, + "maxLength": 30, "pattern": "^.*\\S.*" }, "postalCode": { diff --git a/dist/definitions.json b/dist/definitions.json index 0c27b64a8..2e3b61e37 100644 --- a/dist/definitions.json +++ b/dist/definitions.json @@ -2010,7 +2010,7 @@ "city": { "type": "string", "minLength": 1, - "maxLength": 51, + "maxLength": 30, "pattern": "^.*\\S.*" }, "postalCode": { diff --git a/package.json b/package.json index 66ab5b15a..5eadc1316 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vets-json-schema", - "version": "20.29.1", + "version": "20.30.1", "repository": { "type": "git", "url": "git+https://github.com/department-of-veterans-affairs/vets-json-schema.git" diff --git a/src/common/definitions.js b/src/common/definitions.js index f1db29683..a35433ddc 100644 --- a/src/common/definitions.js +++ b/src/common/definitions.js @@ -149,7 +149,7 @@ const hcaAddress = (() => { city: { type: 'string', minLength: 1, - maxLength: 51, + maxLength: 30, ...rejectOnlyWhitespace, }, postalCode: { @@ -158,7 +158,7 @@ const hcaAddress = (() => { }, }, required: ['street', 'city', 'country'], - } + }; })(); const address = (() => { diff --git a/test/common/definitions.spec.js b/test/common/definitions.spec.js index 56a4df860..c79a46c72 100644 --- a/test/common/definitions.spec.js +++ b/test/common/definitions.spec.js @@ -422,7 +422,7 @@ describe('schema definitions', () => { street: stringGenerate(23), street2: stringGenerate(13), street3: stringGenerate(5), - city: stringGenerate(43), + city: stringGenerate(27), postalCode: stringGenerate(5), }, ], @@ -433,7 +433,7 @@ describe('schema definitions', () => { street: stringGenerate(31), street2: stringGenerate(31), street3: stringGenerate(31), - city: stringGenerate(52), + city: stringGenerate(31), postalCode: stringGenerate(52), }, // doesn't allow street, cities, or provinces with only spaces