vld 0.6.0

Type-safe runtime validation library for Rust, inspired by Zod
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
//! Built-in non-English template tables (`russian()`, `german()`, `spanish()`).
//!
//! Every table covers every key of the English table, plus `type.<name>`
//! entries that translate the `{expected}` / `{received}` type names.

pub(super) const RUSSIAN: &[(&str, &str)] = &[
    (
        "invalid_type",
        "Ожидался тип «{expected}», получен «{received}»",
    ),
    ("type.string", "строка"),
    ("type.number", "число"),
    ("type.integer", "целое число"),
    ("type.boolean", "логическое значение"),
    ("type.array", "массив"),
    ("type.object", "объект"),
    ("type.null", "null"),
    ("type.never", "ничего"),
    ("type.date", "дата (ГГГГ-ММ-ДД)"),
    ("type.datetime", "дата и время"),
    ("type.time", "время (ЧЧ:ММ:СС)"),
    ("type.duration", "длительность (секунды или строка)"),
    ("type.decimal", "десятичное число (строка или число)"),
    ("type.path", "путь"),
    ("type.file", "путь к файлу"),
    ("type.socket_addr", "адрес сокета"),
    ("type.ip_network", "IP-сеть (CIDR)"),
    ("type.bytes", "массив байтов"),
    (
        "type.bytes_or_string",
        "массив байтов или закодированная строка",
    ),
    ("type.byte", "байт (целое 0..=255)"),
    ("too_small", "Значение должно быть не менее {minimum}"),
    (
        "too_small.string",
        "Строка должна содержать не менее {minimum} символов",
    ),
    (
        "too_small.string_one",
        "Строка должна содержать не менее {minimum} символа",
    ),
    ("too_small.number", "Число должно быть не менее {minimum}"),
    (
        "too_small.decimal",
        "Десятичное число должно быть не менее {minimum}",
    ),
    (
        "too_small.array",
        "Массив должен содержать не менее {minimum} элементов",
    ),
    (
        "too_small.array_one",
        "Массив должен содержать не менее {minimum} элемента",
    ),
    (
        "too_small.set",
        "Множество должно содержать не менее {minimum} уникальных элементов",
    ),
    (
        "too_small.set_one",
        "Множество должно содержать не менее {minimum} уникального элемента",
    ),
    (
        "too_small.record",
        "Запись должна содержать не менее {minimum} ключей",
    ),
    (
        "too_small.record_one",
        "Запись должна содержать не менее {minimum} ключа",
    ),
    (
        "too_small.object",
        "Объект должен содержать не менее {minimum} ключей",
    ),
    (
        "too_small.object_one",
        "Объект должен содержать не менее {minimum} ключа",
    ),
    (
        "too_small.bytes",
        "Длина в байтах должна быть не менее {minimum}",
    ),
    ("too_small.date", "Дата должна быть не раньше {minimum}"),
    (
        "too_small.datetime",
        "Дата и время должны быть не раньше {minimum}",
    ),
    ("too_small.time", "Время должно быть не раньше {minimum}"),
    (
        "too_small.duration",
        "Длительность должна быть не менее {minimum} с",
    ),
    (
        "too_small.file",
        "Размер файла должен быть не менее {minimum} байт",
    ),
    (
        "too_small.image_width",
        "Ширина изображения должна быть >= {minimum}",
    ),
    (
        "too_small.image_height",
        "Высота изображения должна быть >= {minimum}",
    ),
    ("too_small.port", "Порт должен быть не менее {minimum}"),
    (
        "too_small.contains",
        "Массив должен содержать требуемое значение не менее {minimum} раз",
    ),
    (
        "too_small_exclusive",
        "Значение должно быть больше {minimum}",
    ),
    (
        "too_small_exclusive.number",
        "Число должно быть больше {minimum}",
    ),
    (
        "too_small_exclusive.decimal",
        "Десятичное число должно быть больше {minimum}",
    ),
    ("too_big", "Значение должно быть не более {maximum}"),
    (
        "too_big.string",
        "Строка должна содержать не более {maximum} символов",
    ),
    (
        "too_big.string_one",
        "Строка должна содержать не более {maximum} символа",
    ),
    ("too_big.number", "Число должно быть не более {maximum}"),
    (
        "too_big.decimal",
        "Десятичное число должно быть не более {maximum}",
    ),
    (
        "too_big.array",
        "Массив должен содержать не более {maximum} элементов",
    ),
    (
        "too_big.array_one",
        "Массив должен содержать не более {maximum} элемента",
    ),
    (
        "too_big.set",
        "Множество должно содержать не более {maximum} уникальных элементов",
    ),
    (
        "too_big.set_one",
        "Множество должно содержать не более {maximum} уникального элемента",
    ),
    (
        "too_big.record",
        "Запись должна содержать не более {maximum} ключей",
    ),
    (
        "too_big.record_one",
        "Запись должна содержать не более {maximum} ключа",
    ),
    (
        "too_big.object",
        "Объект должен содержать не более {maximum} ключей",
    ),
    (
        "too_big.object_one",
        "Объект должен содержать не более {maximum} ключа",
    ),
    (
        "too_big.bytes",
        "Длина в байтах должна быть не более {maximum}",
    ),
    ("too_big.date", "Дата должна быть не позже {maximum}"),
    (
        "too_big.datetime",
        "Дата и время должны быть не позже {maximum}",
    ),
    ("too_big.time", "Время должно быть не позже {maximum}"),
    (
        "too_big.duration",
        "Длительность должна быть не более {maximum} с",
    ),
    (
        "too_big.file",
        "Размер файла должен быть не более {maximum} байт",
    ),
    (
        "too_big.image_width",
        "Ширина изображения должна быть <= {maximum}",
    ),
    (
        "too_big.image_height",
        "Высота изображения должна быть <= {maximum}",
    ),
    ("too_big.port", "Порт должен быть не более {maximum}"),
    (
        "too_big.contains",
        "Массив должен содержать требуемое значение не более {maximum} раз",
    ),
    ("too_big_exclusive", "Значение должно быть меньше {maximum}"),
    (
        "too_big_exclusive.number",
        "Число должно быть меньше {maximum}",
    ),
    (
        "too_big_exclusive.decimal",
        "Десятичное число должно быть меньше {maximum}",
    ),
    ("invalid_length", "Длина должна быть ровно {expected}"),
    (
        "invalid_length.string",
        "Строка должна содержать ровно {expected} символов",
    ),
    (
        "invalid_length.string_one",
        "Строка должна содержать ровно {expected} символ",
    ),
    (
        "invalid_length.string_few",
        "Строка должна содержать ровно {expected} символа",
    ),
    (
        "invalid_length.array",
        "Массив должен содержать ровно {expected} элементов",
    ),
    (
        "invalid_length.array_one",
        "Массив должен содержать ровно {expected} элемент",
    ),
    (
        "invalid_length.array_few",
        "Массив должен содержать ровно {expected} элемента",
    ),
    (
        "invalid_length.tuple",
        "Ожидался кортеж из {expected} элементов",
    ),
    (
        "invalid_length.tuple_one",
        "Ожидался кортеж из {expected} элемента",
    ),
    (
        "invalid_length.bytes",
        "Длина в байтах должна быть ровно {expected}",
    ),
    ("invalid_string", "Некорректная строка ({validation})"),
    (
        "invalid_string.email",
        "Некорректный адрес электронной почты",
    ),
    ("invalid_string.url", "Некорректный URL"),
    ("invalid_string.url_strict", "Некорректный строгий URL"),
    ("invalid_string.uri", "Некорректный URI"),
    ("invalid_string.uuid", "Некорректный UUID"),
    ("invalid_string.uuid_v1", "Некорректный UUID v1"),
    ("invalid_string.uuid_v4", "Некорректный UUID v4"),
    ("invalid_string.uuid_v7", "Некорректный UUID v7"),
    ("invalid_string.ip", "Некорректный IP-адрес"),
    ("invalid_string.slug", "Некорректный slug"),
    ("invalid_string.color", "Некорректный цвет"),
    ("invalid_string.currency", "Некорректный код валюты"),
    ("invalid_string.country_code", "Некорректный код страны"),
    ("invalid_string.locale", "Некорректная локаль"),
    ("invalid_string.cron", "Некорректное cron-выражение"),
    ("invalid_string.regex", "Строка не соответствует шаблону"),
    (
        "invalid_string.starts_with",
        "Строка должна начинаться с \"{prefix}\"",
    ),
    (
        "invalid_string.ends_with",
        "Строка должна заканчиваться на \"{suffix}\"",
    ),
    (
        "invalid_string.contains",
        "Строка должна содержать \"{substring}\"",
    ),
    ("invalid_string.ipv4", "Некорректный IPv4-адрес"),
    ("invalid_string.ipv6", "Некорректный IPv6-адрес"),
    ("invalid_string.cidr", "Некорректный CIDR"),
    ("invalid_string.mac", "Некорректный MAC-адрес"),
    (
        "invalid_string.hex",
        "Некорректная шестнадцатеричная строка",
    ),
    ("invalid_string.credit_card", "Некорректный номер карты"),
    ("invalid_string.phone", "Некорректный номер телефона"),
    (
        "invalid_string.phone_e164",
        "Некорректный номер телефона E.164",
    ),
    ("invalid_string.semver", "Некорректная версия semver"),
    (
        "invalid_string.semver_full",
        "Некорректная семантическая версия",
    ),
    ("invalid_string.jwt", "Некорректный JWT"),
    (
        "invalid_string.ascii",
        "Строка должна содержать только символы ASCII",
    ),
    (
        "invalid_string.alpha",
        "Строка должна содержать только буквы",
    ),
    (
        "invalid_string.alphanumeric",
        "Строка должна содержать только буквы и цифры",
    ),
    (
        "invalid_string.lowercase",
        "Строка должна быть в нижнем регистре",
    ),
    (
        "invalid_string.uppercase",
        "Строка должна быть в верхнем регистре",
    ),
    ("invalid_string.base64", "Некорректная строка Base64"),
    ("invalid_string.base64url", "Некорректная строка Base64URL"),
    ("invalid_string.json", "Некорректная строка JSON"),
    (
        "invalid_string.iso_date",
        "Некорректная дата ISO (ожидалось ГГГГ-ММ-ДД)",
    ),
    (
        "invalid_string.iso_datetime",
        "Некорректные дата и время ISO",
    ),
    ("invalid_string.iso_time", "Некорректное время ISO"),
    ("invalid_string.hostname", "Некорректное имя хоста"),
    ("invalid_string.cuid2", "Некорректный CUID2"),
    ("invalid_string.ulid", "Некорректный ULID"),
    ("invalid_string.nanoid", "Некорректный Nano ID"),
    (
        "invalid_string.emoji",
        "Строка должна содержать только эмодзи",
    ),
    ("invalid_format", "Некорректный формат ({format})"),
    ("invalid_format.decimal", "Некорректное десятичное число"),
    ("invalid_format.ip_network", "Некорректная IP-сеть/CIDR"),
    ("invalid_format.ipv4_network", "Ожидалась сеть IPv4"),
    ("invalid_format.ipv6_network", "Ожидалась сеть IPv6"),
    (
        "invalid_format.socket_addr",
        "Некорректный адрес сокета (ожидалось `ipv4:порт` или `[ipv6]:порт`; имена хостов не разрешаются)",
    ),
    (
        "invalid_format.base64",
        "Некорректная байтовая строка Base64",
    ),
    (
        "invalid_format.base64url",
        "Некорректная байтовая строка Base64URL",
    ),
    (
        "invalid_format.hex",
        "Некорректная шестнадцатеричная байтовая строка",
    ),
    (
        "invalid_format.image",
        "Не удалось декодировать изображение",
    ),
    ("invalid_format.from_str", "Некорректное значение"),
    ("invalid_date", "Некорректное значение ({kind})"),
    (
        "invalid_date.date",
        "Некорректный формат даты: ожидалось ГГГГ-ММ-ДД",
    ),
    (
        "invalid_date.datetime",
        "Некорректный формат даты и времени",
    ),
    (
        "invalid_date.time",
        "Некорректный формат времени: ожидалось ЧЧ:ММ:СС[.доли]",
    ),
    (
        "invalid_timezone_offset",
        "Смещение часового пояса должно быть {expected}",
    ),
    ("not_in_past", "Значение должно быть в прошлом"),
    ("not_in_past.date", "Дата должна быть в прошлом"),
    ("not_in_past.datetime", "Дата и время должны быть в прошлом"),
    ("not_in_future", "Значение должно быть в будущем"),
    ("not_in_future.date", "Дата должна быть в будущем"),
    (
        "not_in_future.datetime",
        "Дата и время должны быть в будущем",
    ),
    ("not_int", "Ожидалось целое число"),
    ("not_finite", "Число должно быть конечным"),
    ("not_multiple_of", "Число должно быть кратно {divisor}"),
    (
        "not_safe_integer",
        "Число должно быть безопасным целым (от -(2^53-1) до 2^53-1)",
    ),
    ("invalid_literal", "Ожидалось значение {expected}"),
    (
        "invalid_enum_value",
        "Недопустимое значение. Ожидалось одно из: {options}",
    ),
    (
        "invalid_union",
        "Значение не соответствует ни одному из вариантов",
    ),
    ("union_variant", "[вариант {n}]"),
    (
        "invalid_discriminator",
        "Недопустимое значение дискриминатора. Ожидалось одно из: {options}",
    ),
    ("not_unique", "Элементы массива должны быть уникальными"),
    (
        "missing_contains",
        "Массив должен содержать требуемое значение",
    ),
    ("duplicate_key", "Повторяющийся ключ"),
    (
        "invalid_map_entry",
        "Каждая запись Map должна быть массивом [ключ, значение] длины 2",
    ),
    ("missing_field", "Обязательное поле отсутствует"),
    ("unrecognized_field", "Неизвестное поле"),
    (
        "path_outside_base",
        "Путь должен находиться внутри каталога: {base}",
    ),
    ("path_not_absolute", "Путь должен быть абсолютным"),
    ("path_not_relative", "Путь должен быть относительным"),
    ("path_not_found", "Путь не существует"),
    ("path_not_file", "Путь не является файлом"),
    ("path_not_dir", "Путь не является каталогом"),
    (
        "json_too_deep",
        "Глубина JSON превышает максимум {max_depth}",
    ),
    (
        "file_type_not_allowed",
        "Файл ({kind}) `{actual}` не разрешён (ожидалось одно из: {allowed})",
    ),
    ("file_type_denied", "Файл ({kind}) `{actual}` запрещён"),
    ("file_type_unknown", "Не удалось определить файл ({kind})"),
    (
        "checksum_mismatch",
        "Контрольная сумма {algorithm} не совпадает",
    ),
    (
        "missing_exif",
        "Изображение должно содержать метаданные EXIF",
    ),
    ("serialize_error", "Ошибка сериализации: {detail}"),
    ("io_error", "Ошибка ввода-вывода"),
    ("parse_error", "Ошибка разбора входных данных"),
    ("custom", "Ошибка валидации: {code}"),
];

pub(super) const GERMAN: &[(&str, &str)] = &[
    ("invalid_type", "{expected} erwartet, {received} erhalten"),
    ("type.string", "Zeichenkette"),
    ("type.number", "Zahl"),
    ("type.integer", "Ganzzahl"),
    ("type.boolean", "Wahrheitswert"),
    ("type.array", "Array"),
    ("type.object", "Objekt"),
    ("type.null", "null"),
    ("type.never", "nichts"),
    ("type.date", "Datum (JJJJ-MM-TT)"),
    ("type.datetime", "Datum mit Uhrzeit"),
    ("type.time", "Uhrzeit (HH:MM:SS)"),
    ("type.duration", "Dauer (Sekunden oder Zeichenkette)"),
    ("type.decimal", "Dezimalzahl (Zeichenkette oder Zahl)"),
    ("type.path", "Pfad"),
    ("type.file", "Dateipfad"),
    ("type.socket_addr", "Socket-Adresse"),
    ("type.ip_network", "IP-Netz (CIDR)"),
    ("type.bytes", "Byte-Array"),
    (
        "type.bytes_or_string",
        "Byte-Array oder kodierte Zeichenkette",
    ),
    ("type.byte", "Byte (Ganzzahl 0..=255)"),
    ("too_small", "Wert muss mindestens {minimum} sein"),
    (
        "too_small.string",
        "Zeichenkette muss mindestens {minimum} Zeichen lang sein",
    ),
    (
        "too_small.string_one",
        "Zeichenkette muss mindestens {minimum} Zeichen lang sein",
    ),
    ("too_small.number", "Zahl muss mindestens {minimum} sein"),
    (
        "too_small.decimal",
        "Dezimalzahl muss mindestens {minimum} sein",
    ),
    (
        "too_small.array",
        "Array muss mindestens {minimum} Elemente enthalten",
    ),
    (
        "too_small.array_one",
        "Array muss mindestens {minimum} Element enthalten",
    ),
    (
        "too_small.set",
        "Menge muss mindestens {minimum} eindeutige Elemente enthalten",
    ),
    (
        "too_small.set_one",
        "Menge muss mindestens {minimum} eindeutiges Element enthalten",
    ),
    (
        "too_small.record",
        "Datensatz muss mindestens {minimum} Schlüssel enthalten",
    ),
    (
        "too_small.record_one",
        "Datensatz muss mindestens {minimum} Schlüssel enthalten",
    ),
    (
        "too_small.object",
        "Objekt muss mindestens {minimum} Schlüssel enthalten",
    ),
    (
        "too_small.object_one",
        "Objekt muss mindestens {minimum} Schlüssel enthalten",
    ),
    (
        "too_small.bytes",
        "Bytelänge muss mindestens {minimum} sein",
    ),
    (
        "too_small.date",
        "Datum muss am oder nach dem {minimum} liegen",
    ),
    (
        "too_small.datetime",
        "Zeitpunkt muss am oder nach {minimum} liegen",
    ),
    (
        "too_small.time",
        "Uhrzeit muss um oder nach {minimum} liegen",
    ),
    (
        "too_small.duration",
        "Dauer muss mindestens {minimum} s betragen",
    ),
    (
        "too_small.file",
        "Dateigröße muss mindestens {minimum} Bytes betragen",
    ),
    ("too_small.image_width", "Bildbreite muss >= {minimum} sein"),
    ("too_small.image_height", "Bildhöhe muss >= {minimum} sein"),
    ("too_small.port", "Port muss mindestens {minimum} sein"),
    (
        "too_small.contains",
        "Array muss den geforderten Wert mindestens {minimum}-mal enthalten",
    ),
    ("too_small_exclusive", "Wert muss größer als {minimum} sein"),
    (
        "too_small_exclusive.number",
        "Zahl muss größer als {minimum} sein",
    ),
    (
        "too_small_exclusive.decimal",
        "Dezimalzahl muss größer als {minimum} sein",
    ),
    ("too_big", "Wert darf höchstens {maximum} sein"),
    (
        "too_big.string",
        "Zeichenkette darf höchstens {maximum} Zeichen lang sein",
    ),
    (
        "too_big.string_one",
        "Zeichenkette darf höchstens {maximum} Zeichen lang sein",
    ),
    ("too_big.number", "Zahl darf höchstens {maximum} sein"),
    (
        "too_big.decimal",
        "Dezimalzahl darf höchstens {maximum} sein",
    ),
    (
        "too_big.array",
        "Array darf höchstens {maximum} Elemente enthalten",
    ),
    (
        "too_big.array_one",
        "Array darf höchstens {maximum} Element enthalten",
    ),
    (
        "too_big.set",
        "Menge darf höchstens {maximum} eindeutige Elemente enthalten",
    ),
    (
        "too_big.set_one",
        "Menge darf höchstens {maximum} eindeutiges Element enthalten",
    ),
    (
        "too_big.record",
        "Datensatz darf höchstens {maximum} Schlüssel enthalten",
    ),
    (
        "too_big.record_one",
        "Datensatz darf höchstens {maximum} Schlüssel enthalten",
    ),
    (
        "too_big.object",
        "Objekt darf höchstens {maximum} Schlüssel enthalten",
    ),
    (
        "too_big.object_one",
        "Objekt darf höchstens {maximum} Schlüssel enthalten",
    ),
    ("too_big.bytes", "Bytelänge darf höchstens {maximum} sein"),
    (
        "too_big.date",
        "Datum muss am oder vor dem {maximum} liegen",
    ),
    (
        "too_big.datetime",
        "Zeitpunkt muss am oder vor {maximum} liegen",
    ),
    ("too_big.time", "Uhrzeit muss um oder vor {maximum} liegen"),
    (
        "too_big.duration",
        "Dauer darf höchstens {maximum} s betragen",
    ),
    (
        "too_big.file",
        "Dateigröße darf höchstens {maximum} Bytes betragen",
    ),
    ("too_big.image_width", "Bildbreite muss <= {maximum} sein"),
    ("too_big.image_height", "Bildhöhe muss <= {maximum} sein"),
    ("too_big.port", "Port darf höchstens {maximum} sein"),
    (
        "too_big.contains",
        "Array darf den geforderten Wert höchstens {maximum}-mal enthalten",
    ),
    ("too_big_exclusive", "Wert muss kleiner als {maximum} sein"),
    (
        "too_big_exclusive.number",
        "Zahl muss kleiner als {maximum} sein",
    ),
    (
        "too_big_exclusive.decimal",
        "Dezimalzahl muss kleiner als {maximum} sein",
    ),
    ("invalid_length", "Länge muss genau {expected} sein"),
    (
        "invalid_length.string",
        "Zeichenkette muss genau {expected} Zeichen lang sein",
    ),
    (
        "invalid_length.string_one",
        "Zeichenkette muss genau {expected} Zeichen lang sein",
    ),
    (
        "invalid_length.array",
        "Array muss genau {expected} Elemente enthalten",
    ),
    (
        "invalid_length.array_one",
        "Array muss genau {expected} Element enthalten",
    ),
    (
        "invalid_length.tuple",
        "Tupel mit {expected} Elementen erwartet",
    ),
    (
        "invalid_length.tuple_one",
        "Tupel mit {expected} Element erwartet",
    ),
    (
        "invalid_length.bytes",
        "Bytelänge muss genau {expected} sein",
    ),
    ("invalid_string", "Ungültige Zeichenkette ({validation})"),
    ("invalid_string.email", "Ungültige E-Mail-Adresse"),
    ("invalid_string.url", "Ungültige URL"),
    ("invalid_string.url_strict", "Ungültige strikte URL"),
    ("invalid_string.uri", "Ungültige URI"),
    ("invalid_string.uuid", "Ungültige UUID"),
    ("invalid_string.uuid_v1", "Ungültige UUID v1"),
    ("invalid_string.uuid_v4", "Ungültige UUID v4"),
    ("invalid_string.uuid_v7", "Ungültige UUID v7"),
    ("invalid_string.ip", "Ungültige IP-Adresse"),
    ("invalid_string.slug", "Ungültiger Slug"),
    ("invalid_string.color", "Ungültige Farbe"),
    ("invalid_string.currency", "Ungültiger Währungscode"),
    ("invalid_string.country_code", "Ungültiger Ländercode"),
    ("invalid_string.locale", "Ungültiges Gebietsschema"),
    ("invalid_string.cron", "Ungültiger Cron-Ausdruck"),
    (
        "invalid_string.regex",
        "Zeichenkette entspricht nicht dem Muster",
    ),
    (
        "invalid_string.starts_with",
        "Zeichenkette muss mit \"{prefix}\" beginnen",
    ),
    (
        "invalid_string.ends_with",
        "Zeichenkette muss mit \"{suffix}\" enden",
    ),
    (
        "invalid_string.contains",
        "Zeichenkette muss \"{substring}\" enthalten",
    ),
    ("invalid_string.ipv4", "Ungültige IPv4-Adresse"),
    ("invalid_string.ipv6", "Ungültige IPv6-Adresse"),
    ("invalid_string.cidr", "Ungültiger CIDR"),
    ("invalid_string.mac", "Ungültige MAC-Adresse"),
    ("invalid_string.hex", "Ungültige Hexadezimal-Zeichenkette"),
    ("invalid_string.credit_card", "Ungültige Kreditkartennummer"),
    ("invalid_string.phone", "Ungültige Telefonnummer"),
    ("invalid_string.phone_e164", "Ungültige E.164-Telefonnummer"),
    ("invalid_string.semver", "Ungültige Semver-Version"),
    (
        "invalid_string.semver_full",
        "Ungültige semantische Version",
    ),
    ("invalid_string.jwt", "Ungültiges JWT"),
    (
        "invalid_string.ascii",
        "Zeichenkette darf nur ASCII-Zeichen enthalten",
    ),
    (
        "invalid_string.alpha",
        "Zeichenkette darf nur Buchstaben enthalten",
    ),
    (
        "invalid_string.alphanumeric",
        "Zeichenkette darf nur Buchstaben und Ziffern enthalten",
    ),
    (
        "invalid_string.lowercase",
        "Zeichenkette muss kleingeschrieben sein",
    ),
    (
        "invalid_string.uppercase",
        "Zeichenkette muss großgeschrieben sein",
    ),
    ("invalid_string.base64", "Ungültige Base64-Zeichenkette"),
    (
        "invalid_string.base64url",
        "Ungültige Base64URL-Zeichenkette",
    ),
    ("invalid_string.json", "Ungültige JSON-Zeichenkette"),
    (
        "invalid_string.iso_date",
        "Ungültiges ISO-Datum (erwartet JJJJ-MM-TT)",
    ),
    ("invalid_string.iso_datetime", "Ungültiger ISO-Zeitpunkt"),
    ("invalid_string.iso_time", "Ungültige ISO-Uhrzeit"),
    ("invalid_string.hostname", "Ungültiger Hostname"),
    ("invalid_string.cuid2", "Ungültige CUID2"),
    ("invalid_string.ulid", "Ungültige ULID"),
    ("invalid_string.nanoid", "Ungültige Nano ID"),
    (
        "invalid_string.emoji",
        "Zeichenkette darf nur Emojis enthalten",
    ),
    ("invalid_format", "Ungültiges Format ({format})"),
    ("invalid_format.decimal", "Ungültiger Dezimalwert"),
    ("invalid_format.ip_network", "Ungültiges IP-Netz/CIDR"),
    ("invalid_format.ipv4_network", "IPv4-Netz erwartet"),
    ("invalid_format.ipv6_network", "IPv6-Netz erwartet"),
    (
        "invalid_format.socket_addr",
        "Ungültige Socket-Adresse (erwartet `ipv4:port` oder `[ipv6]:port`; Hostnamen werden nicht aufgelöst)",
    ),
    ("invalid_format.base64", "Ungültige Base64-Bytefolge"),
    ("invalid_format.base64url", "Ungültige Base64URL-Bytefolge"),
    ("invalid_format.hex", "Ungültige Hex-Bytefolge"),
    ("invalid_format.image", "Bild konnte nicht dekodiert werden"),
    ("invalid_format.from_str", "Ungültiger Wert"),
    ("invalid_date", "Ungültiger Wert ({kind})"),
    (
        "invalid_date.date",
        "Ungültiges Datumsformat: erwartet JJJJ-MM-TT",
    ),
    ("invalid_date.datetime", "Ungültiges Zeitpunktformat"),
    (
        "invalid_date.time",
        "Ungültiges Uhrzeitformat: erwartet HH:MM:SS[.Bruchteil]",
    ),
    (
        "invalid_timezone_offset",
        "Zeitzonenversatz muss {expected} sein",
    ),
    ("not_in_past", "Wert muss in der Vergangenheit liegen"),
    ("not_in_past.date", "Datum muss in der Vergangenheit liegen"),
    (
        "not_in_past.datetime",
        "Zeitpunkt muss in der Vergangenheit liegen",
    ),
    ("not_in_future", "Wert muss in der Zukunft liegen"),
    ("not_in_future.date", "Datum muss in der Zukunft liegen"),
    (
        "not_in_future.datetime",
        "Zeitpunkt muss in der Zukunft liegen",
    ),
    ("not_int", "Ganzzahl erwartet"),
    ("not_finite", "Zahl muss endlich sein"),
    (
        "not_multiple_of",
        "Zahl muss ein Vielfaches von {divisor} sein",
    ),
    (
        "not_safe_integer",
        "Zahl muss eine sichere Ganzzahl sein (-(2^53-1) bis 2^53-1)",
    ),
    ("invalid_literal", "Literal {expected} erwartet"),
    (
        "invalid_enum_value",
        "Ungültiger Enum-Wert. Erwartet einer von: {options}",
    ),
    (
        "invalid_union",
        "Eingabe passt zu keiner Variante der Union",
    ),
    ("union_variant", "[Variante {n}]"),
    (
        "invalid_discriminator",
        "Ungültiger Diskriminatorwert. Erwartet einer von: {options}",
    ),
    ("not_unique", "Array-Elemente müssen eindeutig sein"),
    (
        "missing_contains",
        "Array muss den geforderten Wert enthalten",
    ),
    ("duplicate_key", "Doppelter Map-Schlüssel"),
    (
        "invalid_map_entry",
        "Jeder Map-Eintrag muss ein [Schlüssel, Wert]-Array der Länge 2 sein",
    ),
    ("missing_field", "Pflichtfeld fehlt"),
    ("unrecognized_field", "Unbekanntes Feld"),
    (
        "path_outside_base",
        "Pfad muss innerhalb des Basisverzeichnisses liegen: {base}",
    ),
    ("path_not_absolute", "Pfad muss absolut sein"),
    ("path_not_relative", "Pfad muss relativ sein"),
    ("path_not_found", "Pfad existiert nicht"),
    ("path_not_file", "Pfad ist keine Datei"),
    ("path_not_dir", "Pfad ist kein Verzeichnis"),
    (
        "json_too_deep",
        "JSON-Tiefe überschreitet das Maximum {max_depth}",
    ),
    (
        "file_type_not_allowed",
        "Datei ({kind}) `{actual}` ist nicht erlaubt (erwartet einer von: {allowed})",
    ),
    ("file_type_denied", "Datei ({kind}) `{actual}` ist verboten"),
    (
        "file_type_unknown",
        "Datei ({kind}) konnte nicht erkannt werden",
    ),
    (
        "checksum_mismatch",
        "{algorithm}-Prüfsumme stimmt nicht überein",
    ),
    ("missing_exif", "Bild muss EXIF-Metadaten enthalten"),
    ("serialize_error", "Serialisierungsfehler: {detail}"),
    ("io_error", "E/A-Fehler"),
    ("parse_error", "Eingabe konnte nicht verarbeitet werden"),
    ("custom", "Validierungsfehler: {code}"),
];

pub(super) const SPANISH: &[(&str, &str)] = &[
    (
        "invalid_type",
        "Se esperaba {expected}, se recibió {received}",
    ),
    ("type.string", "cadena"),
    ("type.number", "número"),
    ("type.integer", "entero"),
    ("type.boolean", "booleano"),
    ("type.array", "arreglo"),
    ("type.object", "objeto"),
    ("type.null", "null"),
    ("type.never", "nada"),
    ("type.date", "fecha (AAAA-MM-DD)"),
    ("type.datetime", "fecha y hora"),
    ("type.time", "hora (HH:MM:SS)"),
    ("type.duration", "duración (segundos o cadena)"),
    ("type.decimal", "decimal (cadena o número)"),
    ("type.path", "ruta"),
    ("type.file", "ruta de archivo"),
    ("type.socket_addr", "dirección de socket"),
    ("type.ip_network", "red IP (CIDR)"),
    ("type.bytes", "arreglo de bytes"),
    (
        "type.bytes_or_string",
        "arreglo de bytes o cadena codificada",
    ),
    ("type.byte", "byte (entero 0..=255)"),
    ("too_small", "El valor debe ser al menos {minimum}"),
    (
        "too_small.string",
        "La cadena debe tener al menos {minimum} caracteres",
    ),
    (
        "too_small.string_one",
        "La cadena debe tener al menos {minimum} carácter",
    ),
    ("too_small.number", "El número debe ser al menos {minimum}"),
    (
        "too_small.decimal",
        "El decimal debe ser al menos {minimum}",
    ),
    (
        "too_small.array",
        "El arreglo debe tener al menos {minimum} elementos",
    ),
    (
        "too_small.array_one",
        "El arreglo debe tener al menos {minimum} elemento",
    ),
    (
        "too_small.set",
        "El conjunto debe tener al menos {minimum} elementos únicos",
    ),
    (
        "too_small.set_one",
        "El conjunto debe tener al menos {minimum} elemento único",
    ),
    (
        "too_small.record",
        "El registro debe tener al menos {minimum} claves",
    ),
    (
        "too_small.record_one",
        "El registro debe tener al menos {minimum} clave",
    ),
    (
        "too_small.object",
        "El objeto debe contener al menos {minimum} claves",
    ),
    (
        "too_small.object_one",
        "El objeto debe contener al menos {minimum} clave",
    ),
    (
        "too_small.bytes",
        "La longitud en bytes debe ser al menos {minimum}",
    ),
    (
        "too_small.date",
        "La fecha debe ser igual o posterior a {minimum}",
    ),
    (
        "too_small.datetime",
        "La fecha y hora debe ser igual o posterior a {minimum}",
    ),
    (
        "too_small.time",
        "La hora debe ser igual o posterior a {minimum}",
    ),
    (
        "too_small.duration",
        "La duración debe ser al menos {minimum} s",
    ),
    (
        "too_small.file",
        "El tamaño del archivo debe ser al menos {minimum} bytes",
    ),
    (
        "too_small.image_width",
        "El ancho de la imagen debe ser >= {minimum}",
    ),
    (
        "too_small.image_height",
        "El alto de la imagen debe ser >= {minimum}",
    ),
    ("too_small.port", "El puerto debe ser al menos {minimum}"),
    (
        "too_small.contains",
        "El arreglo debe contener el valor requerido al menos {minimum} vez/veces",
    ),
    (
        "too_small_exclusive",
        "El valor debe ser mayor que {minimum}",
    ),
    (
        "too_small_exclusive.number",
        "El número debe ser mayor que {minimum}",
    ),
    (
        "too_small_exclusive.decimal",
        "El decimal debe ser mayor que {minimum}",
    ),
    ("too_big", "El valor debe ser como máximo {maximum}"),
    (
        "too_big.string",
        "La cadena debe tener como máximo {maximum} caracteres",
    ),
    (
        "too_big.string_one",
        "La cadena debe tener como máximo {maximum} carácter",
    ),
    ("too_big.number", "El número debe ser como máximo {maximum}"),
    (
        "too_big.decimal",
        "El decimal debe ser como máximo {maximum}",
    ),
    (
        "too_big.array",
        "El arreglo debe tener como máximo {maximum} elementos",
    ),
    (
        "too_big.array_one",
        "El arreglo debe tener como máximo {maximum} elemento",
    ),
    (
        "too_big.set",
        "El conjunto debe tener como máximo {maximum} elementos únicos",
    ),
    (
        "too_big.set_one",
        "El conjunto debe tener como máximo {maximum} elemento único",
    ),
    (
        "too_big.record",
        "El registro debe tener como máximo {maximum} claves",
    ),
    (
        "too_big.record_one",
        "El registro debe tener como máximo {maximum} clave",
    ),
    (
        "too_big.object",
        "El objeto debe contener como máximo {maximum} claves",
    ),
    (
        "too_big.object_one",
        "El objeto debe contener como máximo {maximum} clave",
    ),
    (
        "too_big.bytes",
        "La longitud en bytes debe ser como máximo {maximum}",
    ),
    (
        "too_big.date",
        "La fecha debe ser igual o anterior a {maximum}",
    ),
    (
        "too_big.datetime",
        "La fecha y hora debe ser igual o anterior a {maximum}",
    ),
    (
        "too_big.time",
        "La hora debe ser igual o anterior a {maximum}",
    ),
    (
        "too_big.duration",
        "La duración debe ser como máximo {maximum} s",
    ),
    (
        "too_big.file",
        "El tamaño del archivo debe ser como máximo {maximum} bytes",
    ),
    (
        "too_big.image_width",
        "El ancho de la imagen debe ser <= {maximum}",
    ),
    (
        "too_big.image_height",
        "El alto de la imagen debe ser <= {maximum}",
    ),
    ("too_big.port", "El puerto debe ser como máximo {maximum}"),
    (
        "too_big.contains",
        "El arreglo debe contener el valor requerido como máximo {maximum} vez/veces",
    ),
    ("too_big_exclusive", "El valor debe ser menor que {maximum}"),
    (
        "too_big_exclusive.number",
        "El número debe ser menor que {maximum}",
    ),
    (
        "too_big_exclusive.decimal",
        "El decimal debe ser menor que {maximum}",
    ),
    (
        "invalid_length",
        "La longitud debe ser exactamente {expected}",
    ),
    (
        "invalid_length.string",
        "La cadena debe tener exactamente {expected} caracteres",
    ),
    (
        "invalid_length.string_one",
        "La cadena debe tener exactamente {expected} carácter",
    ),
    (
        "invalid_length.array",
        "El arreglo debe tener exactamente {expected} elementos",
    ),
    (
        "invalid_length.array_one",
        "El arreglo debe tener exactamente {expected} elemento",
    ),
    (
        "invalid_length.tuple",
        "Se esperaba una tupla de {expected} elementos",
    ),
    (
        "invalid_length.tuple_one",
        "Se esperaba una tupla de {expected} elemento",
    ),
    (
        "invalid_length.bytes",
        "La longitud en bytes debe ser exactamente {expected}",
    ),
    ("invalid_string", "Cadena inválida ({validation})"),
    ("invalid_string.email", "Correo electrónico inválido"),
    ("invalid_string.url", "URL inválida"),
    ("invalid_string.url_strict", "URL estricta inválida"),
    ("invalid_string.uri", "URI inválida"),
    ("invalid_string.uuid", "UUID inválido"),
    ("invalid_string.uuid_v1", "UUID v1 inválido"),
    ("invalid_string.uuid_v4", "UUID v4 inválido"),
    ("invalid_string.uuid_v7", "UUID v7 inválido"),
    ("invalid_string.ip", "Dirección IP inválida"),
    ("invalid_string.slug", "Slug inválido"),
    ("invalid_string.color", "Color inválido"),
    ("invalid_string.currency", "Código de moneda inválido"),
    ("invalid_string.country_code", "Código de país inválido"),
    ("invalid_string.locale", "Configuración regional inválida"),
    ("invalid_string.cron", "Expresión cron inválida"),
    (
        "invalid_string.regex",
        "La cadena no coincide con el patrón",
    ),
    (
        "invalid_string.starts_with",
        "La cadena debe empezar con \"{prefix}\"",
    ),
    (
        "invalid_string.ends_with",
        "La cadena debe terminar con \"{suffix}\"",
    ),
    (
        "invalid_string.contains",
        "La cadena debe contener \"{substring}\"",
    ),
    ("invalid_string.ipv4", "Dirección IPv4 inválida"),
    ("invalid_string.ipv6", "Dirección IPv6 inválida"),
    ("invalid_string.cidr", "CIDR inválido"),
    ("invalid_string.mac", "Dirección MAC inválida"),
    ("invalid_string.hex", "Cadena hexadecimal inválida"),
    ("invalid_string.credit_card", "Número de tarjeta inválido"),
    ("invalid_string.phone", "Número de teléfono inválido"),
    (
        "invalid_string.phone_e164",
        "Número de teléfono E.164 inválido",
    ),
    ("invalid_string.semver", "Versión semver inválida"),
    ("invalid_string.semver_full", "Versión semántica inválida"),
    ("invalid_string.jwt", "JWT inválido"),
    (
        "invalid_string.ascii",
        "La cadena solo debe contener caracteres ASCII",
    ),
    (
        "invalid_string.alpha",
        "La cadena solo debe contener letras",
    ),
    (
        "invalid_string.alphanumeric",
        "La cadena solo debe contener letras y números",
    ),
    (
        "invalid_string.lowercase",
        "La cadena debe estar en minúsculas",
    ),
    (
        "invalid_string.uppercase",
        "La cadena debe estar en mayúsculas",
    ),
    ("invalid_string.base64", "Cadena Base64 inválida"),
    ("invalid_string.base64url", "Cadena Base64URL inválida"),
    ("invalid_string.json", "Cadena JSON inválida"),
    (
        "invalid_string.iso_date",
        "Fecha ISO inválida (se esperaba AAAA-MM-DD)",
    ),
    ("invalid_string.iso_datetime", "Fecha y hora ISO inválida"),
    ("invalid_string.iso_time", "Hora ISO inválida"),
    ("invalid_string.hostname", "Nombre de host inválido"),
    ("invalid_string.cuid2", "CUID2 inválido"),
    ("invalid_string.ulid", "ULID inválido"),
    ("invalid_string.nanoid", "Nano ID inválido"),
    (
        "invalid_string.emoji",
        "La cadena solo debe contener emojis",
    ),
    ("invalid_format", "Formato inválido ({format})"),
    ("invalid_format.decimal", "Valor decimal inválido"),
    ("invalid_format.ip_network", "Red IP/CIDR inválida"),
    ("invalid_format.ipv4_network", "Se esperaba una red IPv4"),
    ("invalid_format.ipv6_network", "Se esperaba una red IPv6"),
    (
        "invalid_format.socket_addr",
        "Dirección de socket inválida (se esperaba `ipv4:puerto` o `[ipv6]:puerto`; los nombres de host no se resuelven)",
    ),
    ("invalid_format.base64", "Cadena de bytes Base64 inválida"),
    (
        "invalid_format.base64url",
        "Cadena de bytes Base64URL inválida",
    ),
    ("invalid_format.hex", "Cadena de bytes hexadecimal inválida"),
    ("invalid_format.image", "No se pudo decodificar la imagen"),
    ("invalid_format.from_str", "Valor inválido"),
    ("invalid_date", "Valor inválido ({kind})"),
    (
        "invalid_date.date",
        "Formato de fecha inválido: se esperaba AAAA-MM-DD",
    ),
    ("invalid_date.datetime", "Formato de fecha y hora inválido"),
    (
        "invalid_date.time",
        "Formato de hora inválido: se esperaba HH:MM:SS[.fracción]",
    ),
    (
        "invalid_timezone_offset",
        "El desfase horario debe ser {expected}",
    ),
    ("not_in_past", "El valor debe estar en el pasado"),
    ("not_in_past.date", "La fecha debe estar en el pasado"),
    (
        "not_in_past.datetime",
        "La fecha y hora debe estar en el pasado",
    ),
    ("not_in_future", "El valor debe estar en el futuro"),
    ("not_in_future.date", "La fecha debe estar en el futuro"),
    (
        "not_in_future.datetime",
        "La fecha y hora debe estar en el futuro",
    ),
    ("not_int", "Se esperaba un número entero"),
    ("not_finite", "El número debe ser finito"),
    (
        "not_multiple_of",
        "El número debe ser múltiplo de {divisor}",
    ),
    (
        "not_safe_integer",
        "El número debe ser un entero seguro (-(2^53-1) a 2^53-1)",
    ),
    ("invalid_literal", "Se esperaba el literal {expected}"),
    (
        "invalid_enum_value",
        "Valor de enumeración inválido. Se esperaba uno de: {options}",
    ),
    (
        "invalid_union",
        "La entrada no coincide con ninguna variante de la unión",
    ),
    ("union_variant", "[variante {n}]"),
    (
        "invalid_discriminator",
        "Valor de discriminador inválido. Se esperaba uno de: {options}",
    ),
    ("not_unique", "Los elementos del arreglo deben ser únicos"),
    (
        "missing_contains",
        "El arreglo debe contener el valor requerido",
    ),
    ("duplicate_key", "Clave de mapa duplicada"),
    (
        "invalid_map_entry",
        "Cada entrada del Map debe ser un arreglo [clave, valor] de longitud 2",
    ),
    ("missing_field", "Campo obligatorio faltante"),
    ("unrecognized_field", "Campo no reconocido"),
    (
        "path_outside_base",
        "La ruta debe estar dentro del directorio base: {base}",
    ),
    ("path_not_absolute", "La ruta debe ser absoluta"),
    ("path_not_relative", "La ruta debe ser relativa"),
    ("path_not_found", "La ruta no existe"),
    ("path_not_file", "La ruta no es un archivo"),
    ("path_not_dir", "La ruta no es un directorio"),
    (
        "json_too_deep",
        "La profundidad del JSON supera el máximo {max_depth}",
    ),
    (
        "file_type_not_allowed",
        "El archivo ({kind}) `{actual}` no está permitido (se esperaba uno de: {allowed})",
    ),
    (
        "file_type_denied",
        "El archivo ({kind}) `{actual}` está denegado",
    ),
    (
        "file_type_unknown",
        "No se pudo detectar el archivo ({kind})",
    ),
    (
        "checksum_mismatch",
        "La suma de verificación {algorithm} no coincide",
    ),
    ("missing_exif", "La imagen debe contener metadatos EXIF"),
    ("serialize_error", "Error de serialización: {detail}"),
    ("io_error", "Error de E/S"),
    ("parse_error", "Error al procesar la entrada"),
    ("custom", "Error de validación: {code}"),
];