Skip to content

Commit 2b007ac

Browse files
committed
Change title and message errors now that they are required
1 parent 2d364a0 commit 2b007ac

1 file changed

Lines changed: 6 additions & 8 deletions

File tree

src/error-filtering.ts

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -149,12 +149,11 @@ export const keywordsQueries: ErrorQuery[] = [{
149149

150150
export const messageQueries: ErrorQuery[] = [{
151151
find: {
152-
instancePath: '',
153-
message: 'must have required property \'message\'',
154-
schemaPath: '#/required'
152+
message: 'must NOT have fewer than 1 characters',
153+
schemaPath: '#/properties/message/minLength'
155154
},
156155
replace: {
157-
message: '\'message\' is a required property'
156+
message: '\'message\' needs to be at least 1 character long.'
158157
}
159158
}]
160159

@@ -202,12 +201,11 @@ export const repositoryQueries: ErrorQuery[] = [{
202201

203202
export const titleQueries: ErrorQuery[] = [{
204203
find: {
205-
instancePath: '',
206-
message: 'must have required property \'title\'',
207-
schemaPath: '#/required'
204+
message: 'must NOT have fewer than 1 characters',
205+
schemaPath: '#/properties/title/minLength'
208206
},
209207
replace: {
210-
message: '\'title\' is a required property'
208+
message: '\'title\' needs to be at least 1 character long.'
211209
}
212210
}]
213211

0 commit comments

Comments
 (0)