diff --git a/CHANGELOG.md b/CHANGELOG.md index 87352bba74..39ddd396be 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,8 +4,15 @@ All notable changes to this project will be documented in this file. Dates are d Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). +#### [v5.21.2](https://github.com/opengovsg/FormSG/compare/v5.21.1...v5.21.2) + +- feat: remove validation when logging esrvcId to login collection [`90a0fb0`](https://github.com/opengovsg/FormSG/commit/90a0fb04c450607c5e246c153583844bfe6d42dc) + #### [v5.21.1](https://github.com/opengovsg/FormSG/compare/v5.21.0...v5.21.1) +> 29 July 2021 + +- chore: bump version to v5.21.1 [`139cd93`](https://github.com/opengovsg/FormSG/commit/139cd931e96e92ba5c267dbd8a62124ac058acfe) - fix: allow underscores in form esrvcId validation [`1e7f725`](https://github.com/opengovsg/FormSG/commit/1e7f7250de8621506b916d7b54bde6ab27a225f1) #### [v5.21.0](https://github.com/opengovsg/FormSG/compare/v5.20.0...v5.21.0) diff --git a/package-lock.json b/package-lock.json index cfde6cc3ef..c9b91c6702 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "FormSG", - "version": "5.21.1", + "version": "5.21.2", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index b62688001c..2f27f45f11 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "FormSG", "description": "Form Manager for Government", - "version": "5.21.1", + "version": "5.21.2", "homepage": "https://form.gov.sg", "authors": [ "FormSG " diff --git a/src/app/models/__tests__/login.server.model.spec.ts b/src/app/models/__tests__/login.server.model.spec.ts index 1c625b1d2f..b95fa56476 100644 --- a/src/app/models/__tests__/login.server.model.spec.ts +++ b/src/app/models/__tests__/login.server.model.spec.ts @@ -104,19 +104,6 @@ describe('login.server.model', () => { mongoose.Error.ValidationError, ) }) - - it('should throw validation error when esrvcId param is invalid format', async () => { - // Act - const actualPromise = LoginModel.create({ - ...DEFAULT_PARAMS, - esrvcId: 'id with spaces', - }) - - // Assert - await expect(actualPromise).rejects.toThrowError( - 'e-service ID must be alphanumeric, dashes are allowed', - ) - }) }) describe('Statics', () => { diff --git a/src/app/models/login.server.model.ts b/src/app/models/login.server.model.ts index d9276d302d..2e254e147f 100644 --- a/src/app/models/login.server.model.ts +++ b/src/app/models/login.server.model.ts @@ -39,10 +39,6 @@ const LoginSchema = new Schema( esrvcId: { type: String, required: true, - validate: [ - /^([a-zA-Z0-9-]){1,25}$/i, - 'e-service ID must be alphanumeric, dashes are allowed', - ], }, }, {