@@ -122,7 +122,7 @@ describe('parseCustomError', () => {
122
122
)
123
123
} )
124
124
125
- const getRdiValidationMessageTests : Array < [ [ Maybe < string > , string [ ] ] , string ] > = [
125
+ const getRdiValidationMessageTests : Array < [ [ Maybe < string > , Array < string | number > ] , string ] > = [
126
126
[ [ undefined , [ ] ] , '' ] ,
127
127
[ [ 'Custom message' , [ ] ] , 'Custom message' ] ,
128
128
[ [ 'Input is required' , [ 'field' ] ] , 'Input is required' ] ,
@@ -135,6 +135,23 @@ const getRdiValidationMessageTests: Array<[[Maybe<string>, string[]], string]> =
135
135
[ 'Input should be a valid integer, unable to parse string as an integer' , [ 'body' , 'targets' , 'my-redis' , 'connection' ] ] ,
136
136
'Connection in targets/my-redis should be a valid integer, unable to parse string as an integer'
137
137
] ,
138
+ [
139
+ [ 'Input should be a valid integer, unable to parse string as an integer' , [ 'body' , 'targets' , 'my-redis' , 0 ] ] ,
140
+ 'My-redis[0] in targets should be a valid integer, unable to parse string as an integer'
141
+ ] ,
142
+ [ [ 'Input required' , [ 'body' , 'targets' , 0 ] ] , 'Targets[0] required' ] ,
143
+ [
144
+ [ 'Input should be a valid integer, unable to parse string as an integer' , [ 'body' , 'targets' , 'my-redis' , 2 , 'db' , 'password' ] ] ,
145
+ 'Password in targets/my-redis[2]/db should be a valid integer, unable to parse string as an integer'
146
+ ] ,
147
+ [
148
+ [ 'Input should be a valid integer, unable to parse string as an integer' , [ 'body' , 'targets' , 'my-redis' , 2 , 'password' ] ] ,
149
+ 'Password in targets/my-redis[2] should be a valid integer, unable to parse string as an integer'
150
+ ] ,
151
+ [
152
+ [ 'Input should be a valid integer, unable to parse string as an integer' , [ 'body' , 'targets' , 'my-redis' , 2 , 'password' , 0 ] ] ,
153
+ 'Password[0] in targets/my-redis[2] should be a valid integer, unable to parse string as an integer'
154
+ ] ,
138
155
]
139
156
140
157
describe ( 'getRdiValidationMessage' , ( ) => {
0 commit comments