@@ -30,7 +30,7 @@ const defaultMatcher: Comparator = (error, query) => {
3030 return true
3131}
3232
33- export const byDuplicateAuthor = ( index : number ) => {
33+ export const duplicateAuthorMatcher = ( index : number ) => {
3434 return ( error : ErrorObject ) => {
3535 if ( error . instancePath !== '/authors' ) {
3636 return false
@@ -45,7 +45,7 @@ export const byDuplicateAuthor = (index: number) => {
4545 }
4646}
4747
48- export const byDuplicateIdentifier = ( index : number ) => {
48+ export const duplicateIdentifierMatcher = ( index : number ) => {
4949 return ( error : ErrorObject ) => {
5050 if ( error . instancePath !== '/identifiers' ) {
5151 return false
@@ -60,7 +60,7 @@ export const byDuplicateIdentifier = (index: number) => {
6060 }
6161}
6262
63- export const byDuplicateKeyword = ( index : number ) => {
63+ export const duplicateKeywordMatcher = ( index : number ) => {
6464 return ( error : ErrorObject ) => {
6565 if ( error . instancePath !== '/keywords' ) {
6666 return false
@@ -110,6 +110,27 @@ export const dateReleasedQueries: ErrorQuery[] = [{
110110 }
111111} ]
112112
113+ export const duplicateAuthorQueries : ErrorQuery [ ] = [ {
114+ find : { } ,
115+ replace : {
116+ message : 'This author is a duplicate.'
117+ }
118+ } ]
119+
120+ export const duplicateIdentifierQueries : ErrorQuery [ ] = [ {
121+ find : { } ,
122+ replace : {
123+ message : 'This identifier is a duplicate.'
124+ }
125+ } ]
126+
127+ export const duplicateKeywordQueries : ErrorQuery [ ] = [ {
128+ find : { } ,
129+ replace : {
130+ message : 'This keyword is a duplicate.'
131+ }
132+ } ]
133+
113134export const emailQueries = ( index : number ) => {
114135 return [ {
115136 find : {
0 commit comments