@hookform/resolvers 3.10.0 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (162) hide show
  1. package/README.md +74 -5
  2. package/ajv/dist/ajv.js +1 -1
  3. package/ajv/dist/ajv.js.map +1 -1
  4. package/ajv/dist/ajv.mjs +1 -1
  5. package/ajv/dist/ajv.modern.mjs +1 -1
  6. package/ajv/dist/ajv.modern.mjs.map +1 -1
  7. package/ajv/dist/ajv.module.js +1 -1
  8. package/ajv/dist/ajv.module.js.map +1 -1
  9. package/ajv/dist/ajv.umd.js +1 -1
  10. package/ajv/dist/ajv.umd.js.map +1 -1
  11. package/ajv/dist/types.d.ts +8 -0
  12. package/ajv/src/__tests__/__fixtures__/data-errors.ts +216 -0
  13. package/ajv/src/__tests__/__snapshots__/ajv-errors.ts.snap +462 -0
  14. package/ajv/src/__tests__/__snapshots__/ajv.ts.snap +6 -6
  15. package/ajv/src/__tests__/ajv-errors.ts +227 -0
  16. package/ajv/src/ajv.ts +27 -14
  17. package/ajv/src/types.ts +8 -0
  18. package/arktype/dist/arktype.js +1 -1
  19. package/arktype/dist/arktype.js.map +1 -1
  20. package/arktype/dist/arktype.mjs +1 -1
  21. package/arktype/dist/arktype.modern.mjs +1 -1
  22. package/arktype/dist/arktype.modern.mjs.map +1 -1
  23. package/arktype/dist/arktype.module.js +1 -1
  24. package/arktype/dist/arktype.module.js.map +1 -1
  25. package/arktype/dist/arktype.umd.js +1 -1
  26. package/arktype/dist/arktype.umd.js.map +1 -1
  27. package/arktype/dist/types.d.ts +1 -1
  28. package/arktype/package.json +1 -1
  29. package/arktype/src/__tests__/Form-native-validation.tsx +3 -3
  30. package/arktype/src/__tests__/Form.tsx +2 -2
  31. package/arktype/src/__tests__/__fixtures__/data.ts +1 -1
  32. package/arktype/src/__tests__/__snapshots__/arktype.ts.snap +22 -415
  33. package/arktype/src/arktype.ts +17 -6
  34. package/arktype/src/types.ts +1 -1
  35. package/class-validator/dist/class-validator.js +1 -1
  36. package/class-validator/dist/class-validator.js.map +1 -1
  37. package/class-validator/dist/class-validator.mjs +1 -1
  38. package/class-validator/dist/class-validator.modern.mjs +1 -1
  39. package/class-validator/dist/class-validator.modern.mjs.map +1 -1
  40. package/class-validator/dist/class-validator.module.js +1 -1
  41. package/class-validator/dist/class-validator.module.js.map +1 -1
  42. package/class-validator/dist/class-validator.umd.js +1 -1
  43. package/class-validator/dist/class-validator.umd.js.map +1 -1
  44. package/class-validator/dist/types.d.ts +1 -1
  45. package/class-validator/src/__tests__/class-validator.ts +1 -1
  46. package/class-validator/src/class-validator.ts +1 -1
  47. package/class-validator/src/types.ts +1 -1
  48. package/dist/resolvers.js +1 -1
  49. package/dist/resolvers.js.map +1 -1
  50. package/dist/resolvers.mjs +1 -1
  51. package/dist/resolvers.mjs.map +1 -1
  52. package/dist/resolvers.module.js +1 -1
  53. package/dist/resolvers.module.js.map +1 -1
  54. package/dist/resolvers.umd.js +1 -1
  55. package/dist/resolvers.umd.js.map +1 -1
  56. package/effect-ts/dist/effect-ts.js +1 -1
  57. package/effect-ts/dist/effect-ts.js.map +1 -1
  58. package/effect-ts/dist/effect-ts.mjs +1 -1
  59. package/effect-ts/dist/effect-ts.modern.mjs +1 -1
  60. package/effect-ts/dist/effect-ts.modern.mjs.map +1 -1
  61. package/effect-ts/dist/effect-ts.module.js +1 -1
  62. package/effect-ts/dist/effect-ts.module.js.map +1 -1
  63. package/effect-ts/dist/effect-ts.umd.js +1 -1
  64. package/effect-ts/dist/effect-ts.umd.js.map +1 -1
  65. package/effect-ts/src/__tests__/__snapshots__/effect-ts.ts.snap +35 -1
  66. package/effect-ts/src/__tests__/effect-ts.ts +61 -0
  67. package/effect-ts/src/effect-ts.ts +31 -6
  68. package/io-ts/dist/io-ts.js +1 -1
  69. package/io-ts/dist/io-ts.js.map +1 -1
  70. package/io-ts/dist/io-ts.mjs +1 -1
  71. package/io-ts/dist/io-ts.modern.mjs +1 -1
  72. package/io-ts/dist/io-ts.modern.mjs.map +1 -1
  73. package/io-ts/dist/io-ts.module.js +1 -1
  74. package/io-ts/dist/io-ts.module.js.map +1 -1
  75. package/io-ts/dist/io-ts.umd.js +1 -1
  76. package/io-ts/dist/io-ts.umd.js.map +1 -1
  77. package/package.json +46 -34
  78. package/standard-schema/dist/index.d.ts +2 -0
  79. package/standard-schema/dist/standard-schema.d.ts +2 -0
  80. package/standard-schema/dist/standard-schema.js +2 -0
  81. package/standard-schema/dist/standard-schema.js.map +1 -0
  82. package/standard-schema/dist/standard-schema.mjs +2 -0
  83. package/standard-schema/dist/standard-schema.modern.mjs +2 -0
  84. package/standard-schema/dist/standard-schema.modern.mjs.map +1 -0
  85. package/standard-schema/dist/standard-schema.module.js +2 -0
  86. package/standard-schema/dist/standard-schema.module.js.map +1 -0
  87. package/standard-schema/dist/standard-schema.umd.js +2 -0
  88. package/standard-schema/dist/standard-schema.umd.js.map +1 -0
  89. package/standard-schema/dist/types.d.ts +3 -0
  90. package/standard-schema/package.json +18 -0
  91. package/standard-schema/src/__tests__/Form-native-validation.tsx +82 -0
  92. package/standard-schema/src/__tests__/Form.tsx +56 -0
  93. package/standard-schema/src/__tests__/__fixtures__/data.ts +65 -0
  94. package/standard-schema/src/__tests__/__snapshots__/standard-schema.ts.snap +63 -0
  95. package/standard-schema/src/__tests__/standard-schema.ts +28 -0
  96. package/standard-schema/src/index.ts +2 -0
  97. package/standard-schema/src/standard-schema.ts +45 -0
  98. package/standard-schema/src/types.ts +10 -0
  99. package/superstruct/dist/superstruct.js +1 -1
  100. package/superstruct/dist/superstruct.js.map +1 -1
  101. package/superstruct/dist/superstruct.mjs +1 -1
  102. package/superstruct/dist/superstruct.modern.mjs +1 -1
  103. package/superstruct/dist/superstruct.modern.mjs.map +1 -1
  104. package/superstruct/dist/superstruct.module.js +1 -1
  105. package/superstruct/dist/superstruct.module.js.map +1 -1
  106. package/superstruct/dist/superstruct.umd.js +1 -1
  107. package/superstruct/dist/superstruct.umd.js.map +1 -1
  108. package/superstruct/src/superstruct.ts +1 -1
  109. package/typebox/src/__tests__/__snapshots__/typebox-compiler.ts.snap +21 -21
  110. package/typebox/src/__tests__/__snapshots__/typebox.ts.snap +21 -21
  111. package/typeschema/dist/typeschema.js +1 -1
  112. package/typeschema/dist/typeschema.js.map +1 -1
  113. package/typeschema/dist/typeschema.mjs +1 -1
  114. package/typeschema/dist/typeschema.modern.mjs +1 -1
  115. package/typeschema/dist/typeschema.modern.mjs.map +1 -1
  116. package/typeschema/dist/typeschema.module.js +1 -1
  117. package/typeschema/dist/typeschema.module.js.map +1 -1
  118. package/typeschema/dist/typeschema.umd.js +1 -1
  119. package/typeschema/dist/typeschema.umd.js.map +1 -1
  120. package/typeschema/src/typeschema.ts +3 -1
  121. package/valibot/dist/valibot.js +1 -1
  122. package/valibot/dist/valibot.js.map +1 -1
  123. package/valibot/dist/valibot.mjs +1 -1
  124. package/valibot/dist/valibot.modern.mjs +1 -1
  125. package/valibot/dist/valibot.modern.mjs.map +1 -1
  126. package/valibot/dist/valibot.module.js +1 -1
  127. package/valibot/dist/valibot.module.js.map +1 -1
  128. package/valibot/dist/valibot.umd.js +1 -1
  129. package/valibot/dist/valibot.umd.js.map +1 -1
  130. package/valibot/package.json +1 -1
  131. package/valibot/src/__tests__/valibot.ts +1 -1
  132. package/valibot/src/valibot.ts +3 -1
  133. package/vine/dist/vine.js +1 -1
  134. package/vine/dist/vine.js.map +1 -1
  135. package/vine/dist/vine.mjs +1 -1
  136. package/vine/dist/vine.modern.mjs +1 -1
  137. package/vine/dist/vine.modern.mjs.map +1 -1
  138. package/vine/dist/vine.module.js +1 -1
  139. package/vine/dist/vine.module.js.map +1 -1
  140. package/vine/dist/vine.umd.js +1 -1
  141. package/vine/dist/vine.umd.js.map +1 -1
  142. package/vine/src/vine.ts +1 -1
  143. package/yup/dist/yup.js +1 -1
  144. package/yup/dist/yup.js.map +1 -1
  145. package/yup/dist/yup.mjs +1 -1
  146. package/yup/dist/yup.modern.mjs +1 -1
  147. package/yup/dist/yup.modern.mjs.map +1 -1
  148. package/yup/dist/yup.module.js +1 -1
  149. package/yup/dist/yup.module.js.map +1 -1
  150. package/yup/dist/yup.umd.js +1 -1
  151. package/yup/dist/yup.umd.js.map +1 -1
  152. package/yup/src/yup.ts +1 -1
  153. package/zod/dist/zod.js +1 -1
  154. package/zod/dist/zod.js.map +1 -1
  155. package/zod/dist/zod.mjs +1 -1
  156. package/zod/dist/zod.modern.mjs +1 -1
  157. package/zod/dist/zod.modern.mjs.map +1 -1
  158. package/zod/dist/zod.module.js +1 -1
  159. package/zod/dist/zod.module.js.map +1 -1
  160. package/zod/dist/zod.umd.js +1 -1
  161. package/zod/dist/zod.umd.js.map +1 -1
  162. package/zod/src/zod.ts +1 -1
@@ -0,0 +1,462 @@
1
+ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
2
+
3
+ exports[`ajvResolver with errorMessage > should return a default message if there is no specific message for the error when requirement fails 1`] = `
4
+ {
5
+ "errors": {
6
+ "bar": {
7
+ "message": "data should have properties "foo" and "bar" only",
8
+ "ref": {
9
+ "name": "bar",
10
+ },
11
+ "type": "required",
12
+ "types": {
13
+ "required": "data should have properties "foo" and "bar" only",
14
+ },
15
+ },
16
+ "foo": {
17
+ "message": "data should have properties "foo" and "bar" only",
18
+ "ref": {
19
+ "name": "foo",
20
+ },
21
+ "type": "required",
22
+ "types": {
23
+ "required": "data should have properties "foo" and "bar" only",
24
+ },
25
+ },
26
+ },
27
+ "values": {},
28
+ }
29
+ `;
30
+
31
+ exports[`ajvResolver with errorMessage > should return a default message if there is no specific message for the error when some properties are undefined 1`] = `
32
+ {
33
+ "errors": {
34
+ "bar": {
35
+ "message": "data should have properties "foo" and "bar" only",
36
+ "ref": {
37
+ "name": "bar",
38
+ },
39
+ "type": "required",
40
+ "types": {
41
+ "required": "data should have properties "foo" and "bar" only",
42
+ },
43
+ },
44
+ "foo": {
45
+ "message": "data.foo should be integer >= 2",
46
+ "ref": {
47
+ "name": "foo",
48
+ },
49
+ "type": "minimum",
50
+ "types": {
51
+ "minimum": "data.foo should be integer >= 2",
52
+ },
53
+ },
54
+ },
55
+ "values": {},
56
+ }
57
+ `;
58
+
59
+ exports[`ajvResolver with errorMessage > should return a default message if there is no specific message for the error when walidation fails 1`] = `
60
+ {
61
+ "errors": {
62
+ "bar": {
63
+ "message": "data should have properties "foo" and "bar" only",
64
+ "ref": {
65
+ "name": "bar",
66
+ },
67
+ "type": "required",
68
+ "types": {
69
+ "required": "data should have properties "foo" and "bar" only",
70
+ },
71
+ },
72
+ "foo": {
73
+ "message": "data should have properties "foo" and "bar" only",
74
+ "ref": {
75
+ "name": "foo",
76
+ },
77
+ "type": "required",
78
+ "types": {
79
+ "required": "data should have properties "foo" and "bar" only",
80
+ },
81
+ },
82
+ },
83
+ "values": {},
84
+ }
85
+ `;
86
+
87
+ exports[`ajvResolver with errorMessage > should return customized error messages for certain keywords when requirement fails 1`] = `
88
+ {
89
+ "errors": {
90
+ "foo": {
91
+ "message": "should have property foo",
92
+ "ref": {
93
+ "name": "foo",
94
+ },
95
+ "type": "required",
96
+ "types": {
97
+ "required": "should have property foo",
98
+ },
99
+ },
100
+ },
101
+ "values": {},
102
+ }
103
+ `;
104
+
105
+ exports[`ajvResolver with errorMessage > should return customized error messages for certain keywords when some properties are undefined 1`] = `
106
+ {
107
+ "errors": {
108
+ "foo": {
109
+ "message": "should have property foo",
110
+ "ref": {
111
+ "name": "foo",
112
+ },
113
+ "type": "required",
114
+ "types": {
115
+ "required": "should have property foo",
116
+ },
117
+ },
118
+ },
119
+ "values": {},
120
+ }
121
+ `;
122
+
123
+ exports[`ajvResolver with errorMessage > should return customized error messages for certain keywords when walidation fails 1`] = `
124
+ {
125
+ "errors": {
126
+ "": {
127
+ "message": "should not have properties other than foo",
128
+ "ref": undefined,
129
+ "type": "additionalProperties",
130
+ "types": {
131
+ "additionalProperties": "should not have properties other than foo",
132
+ },
133
+ },
134
+ "foo": {
135
+ "message": "must be integer",
136
+ "ref": {
137
+ "name": "foo",
138
+ },
139
+ "type": "type",
140
+ "types": {
141
+ "type": "must be integer",
142
+ },
143
+ },
144
+ },
145
+ "values": {},
146
+ }
147
+ `;
148
+
149
+ exports[`ajvResolver with errorMessage > should return customized error messages when requirement fails 1`] = `
150
+ {
151
+ "errors": {
152
+ "password": {
153
+ "message": "password field is required",
154
+ "ref": {
155
+ "name": "password",
156
+ },
157
+ "type": "required",
158
+ "types": {
159
+ "required": "password field is required",
160
+ },
161
+ },
162
+ "username": {
163
+ "message": "username field is required",
164
+ "ref": {
165
+ "name": "username",
166
+ },
167
+ "type": "required",
168
+ "types": {
169
+ "required": "username field is required",
170
+ },
171
+ },
172
+ },
173
+ "values": {},
174
+ }
175
+ `;
176
+
177
+ exports[`ajvResolver with errorMessage > should return customized error messages when some properties are undefined 1`] = `
178
+ {
179
+ "errors": {
180
+ "password": {
181
+ "message": "password field is required",
182
+ "ref": {
183
+ "name": "password",
184
+ },
185
+ "type": "required",
186
+ "types": {
187
+ "required": "password field is required",
188
+ },
189
+ },
190
+ "username": {
191
+ "message": "username field is required",
192
+ "ref": {
193
+ "name": "username",
194
+ },
195
+ "type": "required",
196
+ "types": {
197
+ "required": "username field is required",
198
+ },
199
+ },
200
+ },
201
+ "values": {},
202
+ }
203
+ `;
204
+
205
+ exports[`ajvResolver with errorMessage > should return customized error messages when validation fails 1`] = `
206
+ {
207
+ "errors": {
208
+ "password": {
209
+ "message": "One uppercase character",
210
+ "ref": {
211
+ "name": "password",
212
+ },
213
+ "type": "pattern",
214
+ "types": {
215
+ "minLength": "passwords should be at least eight characters long",
216
+ "pattern": "One uppercase character",
217
+ },
218
+ },
219
+ "username": {
220
+ "message": "username should be at least three characters long",
221
+ "ref": {
222
+ "name": "username",
223
+ },
224
+ "type": "minLength",
225
+ "types": {
226
+ "minLength": "username should be at least three characters long",
227
+ },
228
+ },
229
+ },
230
+ "values": {},
231
+ }
232
+ `;
233
+
234
+ exports[`ajvResolver with errorMessage > should return customized errors for properties/items when requirement fails 1`] = `
235
+ {
236
+ "errors": {
237
+ "bar": {
238
+ "message": "must have required property 'bar'",
239
+ "ref": {
240
+ "name": "bar",
241
+ },
242
+ "type": "required",
243
+ "types": {
244
+ "required": "must have required property 'bar'",
245
+ },
246
+ },
247
+ "foo": {
248
+ "message": "must have required property 'foo'",
249
+ "ref": {
250
+ "name": "foo",
251
+ },
252
+ "type": "required",
253
+ "types": {
254
+ "required": "must have required property 'foo'",
255
+ },
256
+ },
257
+ },
258
+ "values": {},
259
+ }
260
+ `;
261
+
262
+ exports[`ajvResolver with errorMessage > should return customized errors for properties/items when some properties are undefined 1`] = `
263
+ {
264
+ "errors": {
265
+ "bar": {
266
+ "message": "must have required property 'bar'",
267
+ "ref": {
268
+ "name": "bar",
269
+ },
270
+ "type": "required",
271
+ "types": {
272
+ "required": "must have required property 'bar'",
273
+ },
274
+ },
275
+ "foo": {
276
+ "message": "must have required property 'foo'",
277
+ "ref": {
278
+ "name": "foo",
279
+ },
280
+ "type": "required",
281
+ "types": {
282
+ "required": "must have required property 'foo'",
283
+ },
284
+ },
285
+ },
286
+ "values": {},
287
+ }
288
+ `;
289
+
290
+ exports[`ajvResolver with errorMessage > should return customized errors for properties/items when walidation fails 1`] = `
291
+ {
292
+ "errors": {
293
+ "bar": {
294
+ "message": "data.bar should be string with length >= 2",
295
+ "ref": {
296
+ "name": "bar",
297
+ },
298
+ "type": "minLength",
299
+ "types": {
300
+ "minLength": "data.bar should be string with length >= 2",
301
+ },
302
+ },
303
+ "foo": {
304
+ "message": "data.foo should be integer >= 2",
305
+ "ref": {
306
+ "name": "foo",
307
+ },
308
+ "type": "minimum",
309
+ "types": {
310
+ "minimum": "data.foo should be integer >= 2",
311
+ },
312
+ },
313
+ },
314
+ "values": {},
315
+ }
316
+ `;
317
+
318
+ exports[`ajvResolver with errorMessage > should return different messages for different properties when requirement fails 1`] = `
319
+ {
320
+ "errors": {
321
+ "bar": {
322
+ "message": "should have a string property "bar"",
323
+ "ref": {
324
+ "name": "bar",
325
+ },
326
+ "type": "required",
327
+ "types": {
328
+ "required": "should have a string property "bar"",
329
+ },
330
+ },
331
+ "foo": {
332
+ "message": "should have an integer property "foo"",
333
+ "ref": {
334
+ "name": "foo",
335
+ },
336
+ "type": "required",
337
+ "types": {
338
+ "required": "should have an integer property "foo"",
339
+ },
340
+ },
341
+ },
342
+ "values": {},
343
+ }
344
+ `;
345
+
346
+ exports[`ajvResolver with errorMessage > should return different messages for different properties when some properties are undefined 1`] = `
347
+ {
348
+ "errors": {
349
+ "bar": {
350
+ "message": "should have a string property "bar"",
351
+ "ref": {
352
+ "name": "bar",
353
+ },
354
+ "type": "required",
355
+ "types": {
356
+ "required": "should have a string property "bar"",
357
+ },
358
+ },
359
+ "foo": {
360
+ "message": "should have an integer property "foo"",
361
+ "ref": {
362
+ "name": "foo",
363
+ },
364
+ "type": "required",
365
+ "types": {
366
+ "required": "should have an integer property "foo"",
367
+ },
368
+ },
369
+ },
370
+ "values": {},
371
+ }
372
+ `;
373
+
374
+ exports[`ajvResolver with errorMessage > should return different messages for different properties when walidation fails 1`] = `
375
+ {
376
+ "errors": {
377
+ "bar": {
378
+ "message": "must be string",
379
+ "ref": {
380
+ "name": "bar",
381
+ },
382
+ "type": "type",
383
+ "types": {
384
+ "type": "must be string",
385
+ },
386
+ },
387
+ "foo": {
388
+ "message": "must be integer",
389
+ "ref": {
390
+ "name": "foo",
391
+ },
392
+ "type": "type",
393
+ "types": {
394
+ "type": "must be integer",
395
+ },
396
+ },
397
+ },
398
+ "values": {},
399
+ }
400
+ `;
401
+
402
+ exports[`ajvResolver with errorMessage > should return the same customized error message when requirement fails 1`] = `
403
+ {
404
+ "errors": {
405
+ "foo": {
406
+ "message": "should be an object with an integer property foo only",
407
+ "ref": {
408
+ "name": "foo",
409
+ },
410
+ "type": "required",
411
+ "types": {
412
+ "required": "should be an object with an integer property foo only",
413
+ },
414
+ },
415
+ },
416
+ "values": {},
417
+ }
418
+ `;
419
+
420
+ exports[`ajvResolver with errorMessage > should return the same customized message for all validation failures 1`] = `
421
+ {
422
+ "errors": {
423
+ "": {
424
+ "message": "should be an object with an integer property foo only",
425
+ "ref": undefined,
426
+ "type": "additionalProperties",
427
+ "types": {
428
+ "additionalProperties": "should be an object with an integer property foo only",
429
+ },
430
+ },
431
+ "foo": {
432
+ "message": "should be an object with an integer property foo only",
433
+ "ref": {
434
+ "name": "foo",
435
+ },
436
+ "type": "type",
437
+ "types": {
438
+ "type": "should be an object with an integer property foo only",
439
+ },
440
+ },
441
+ },
442
+ "values": {},
443
+ }
444
+ `;
445
+
446
+ exports[`ajvResolver with errorMessage > should return the same customized message when some properties are undefined 1`] = `
447
+ {
448
+ "errors": {
449
+ "foo": {
450
+ "message": "should be an object with an integer property foo only",
451
+ "ref": {
452
+ "name": "foo",
453
+ },
454
+ "type": "required",
455
+ "types": {
456
+ "required": "should be an object with an integer property foo only",
457
+ },
458
+ },
459
+ },
460
+ "values": {},
461
+ }
462
+ `;
@@ -104,9 +104,9 @@ exports[`ajvResolver > should return all the error messages from ajvResolver whe
104
104
  "ref": {
105
105
  "name": "password",
106
106
  },
107
- "type": "errorMessage",
107
+ "type": "pattern",
108
108
  "types": {
109
- "errorMessage": "One uppercase character",
109
+ "pattern": "One uppercase character",
110
110
  },
111
111
  },
112
112
  "username": {
@@ -152,9 +152,9 @@ exports[`ajvResolver > should return all the error messages from ajvResolver whe
152
152
  "ref": {
153
153
  "name": "password",
154
154
  },
155
- "type": "errorMessage",
155
+ "type": "pattern",
156
156
  "types": {
157
- "errorMessage": "One uppercase character",
157
+ "pattern": "One uppercase character",
158
158
  },
159
159
  },
160
160
  "username": {
@@ -194,7 +194,7 @@ exports[`ajvResolver > should return single error message from ajvResolver when
194
194
  "ref": {
195
195
  "name": "password",
196
196
  },
197
- "type": "errorMessage",
197
+ "type": "pattern",
198
198
  },
199
199
  "username": {
200
200
  "message": "must NOT have fewer than 3 characters",
@@ -230,7 +230,7 @@ exports[`ajvResolver > should return single error message from ajvResolver when
230
230
  "ref": {
231
231
  "name": "password",
232
232
  },
233
- "type": "errorMessage",
233
+ "type": "pattern",
234
234
  },
235
235
  "username": {
236
236
  "message": "must NOT have fewer than 3 characters",