UNPKG

3.24 kBJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3const joi2desc = {
4 'alternatives.base': '不符合任何一个可选项',
5 'any.empty': '不允许为空',
6 'any.required': '必须填写',
7 'any.unknown': '',
8 'array.base': '应该为数组类型',
9 'any.allowOnly': '',
10 'any.default': '',
11 'any.invalid': '',
12 'array.excludes': '',
13 'array.excludesSingle': '',
14 'array.includesRequiredBoth': '',
15 'array.includesRequiredKnowns': '',
16 'array.includesRequiredUnknowns': '',
17 'array.includes': '',
18 'array.includesSingle': '',
19 'array.length': '',
20 'array.max': '',
21 'array.min': '',
22 'array.orderedLength': '',
23 'array.ref': '',
24 'array.sparse': '',
25 'array.unique': '',
26 'binary.base': '',
27 'binary.length': '',
28 'binary.max': '',
29 'binary.min': '',
30 'boolean.base': '应该为布尔值',
31 'date.base': '应该为一个日期',
32 'date.greater': '',
33 'date.isoDate': '',
34 'date.less': '',
35 'date.max': '',
36 'date.min': '',
37 'date.ref': '',
38 'date.strict': '',
39 'date.timestamp.javascript': '',
40 'date.timestamp.unix': '',
41 'function.arity': '',
42 'function.base': '应该为一个函数',
43 'function.class': '',
44 'function.maxArity': '',
45 'function.minArity': '',
46 'function.ref': '',
47 'lazy.base': '',
48 'lazy.schema': '',
49 'number.base': '应该为一个数字',
50 'number.greater': '',
51 'number.integer': '',
52 'number.less': '',
53 'number.max': '',
54 'number.min': '',
55 'number.multiple': '',
56 'number.negative': '',
57 'number.port': '',
58 'number.positive': '',
59 'number.precision': '',
60 'number.ref': '',
61 'number.unsafe': '',
62 'object.allowUnknown': '不合法的字段',
63 'object.and': '',
64 'object.assert': '',
65 'object.base': '应该为一个对象',
66 'object.length': '',
67 'object.max': '',
68 'object.min': '',
69 'object.missing': '',
70 'object.nand': '',
71 'object.rename.multiple': '',
72 'object.rename.override': '',
73 'object.rename.regex.multiple': '',
74 'object.rename.regex.override': '',
75 'object.schema': '',
76 'object.type': '',
77 'object.with': '',
78 'object.without': '',
79 'object.xor': '',
80 'string.alphanum': '',
81 'string.base64': '',
82 'string.base': '应该为一个字符串',
83 'string.creditCard': '',
84 'string.dataUri': '',
85 'string.email': '',
86 'string.guid': '',
87 'string.hexAlign': '',
88 'string.hex': '',
89 'string.hostname': '',
90 'string.ipVersion': '',
91 'string.ip': '',
92 'string.isoDate': '',
93 'string.length': '',
94 'string.lowercase': '',
95 'string.max': '',
96 'string.min': '',
97 'string.normalize': '',
98 'string.ref': '',
99 'string.regex.base': '',
100 'string.regex.name': '',
101 'string.regex.invert.base': '',
102 'string.regex.invert.name': '',
103 'string.token': '',
104 'string.trim': '',
105 'string.uppercase': '',
106 'string.uri': '',
107 'string.uriCustomScheme': '',
108 'string.uriRelativeOnly': '',
109 'symbol.base': '',
110 'symbol.map': ''
111};
112function default_1(error) {
113 return joi2desc[error.type] || error.message;
114}
115exports.default = default_1;
116//# sourceMappingURL=joi2desc.js.map
\No newline at end of file