@reformer/core 1.0.0-beta.3
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.
- package/LICENSE +21 -0
- package/README.md +53 -0
- package/dist/behaviors.d.ts +2 -0
- package/dist/behaviors.js +230 -0
- package/dist/core/behavior/behavior-applicator.d.ts +71 -0
- package/dist/core/behavior/behavior-applicator.js +92 -0
- package/dist/core/behavior/behavior-context.d.ts +29 -0
- package/dist/core/behavior/behavior-context.js +38 -0
- package/dist/core/behavior/behavior-registry.d.ts +97 -0
- package/dist/core/behavior/behavior-registry.js +198 -0
- package/dist/core/behavior/behaviors/compute-from.d.ts +41 -0
- package/dist/core/behavior/behaviors/compute-from.js +84 -0
- package/dist/core/behavior/behaviors/copy-from.d.ts +31 -0
- package/dist/core/behavior/behaviors/copy-from.js +64 -0
- package/dist/core/behavior/behaviors/enable-when.d.ts +49 -0
- package/dist/core/behavior/behaviors/enable-when.js +81 -0
- package/dist/core/behavior/behaviors/index.d.ts +11 -0
- package/dist/core/behavior/behaviors/index.js +11 -0
- package/dist/core/behavior/behaviors/reset-when.d.ts +51 -0
- package/dist/core/behavior/behaviors/reset-when.js +63 -0
- package/dist/core/behavior/behaviors/revalidate-when.d.ts +30 -0
- package/dist/core/behavior/behaviors/revalidate-when.js +51 -0
- package/dist/core/behavior/behaviors/sync-fields.d.ts +28 -0
- package/dist/core/behavior/behaviors/sync-fields.js +66 -0
- package/dist/core/behavior/behaviors/transform-value.d.ts +120 -0
- package/dist/core/behavior/behaviors/transform-value.js +110 -0
- package/dist/core/behavior/behaviors/watch-field.d.ts +35 -0
- package/dist/core/behavior/behaviors/watch-field.js +56 -0
- package/dist/core/behavior/compose-behavior.d.ts +106 -0
- package/dist/core/behavior/compose-behavior.js +166 -0
- package/dist/core/behavior/create-field-path.d.ts +20 -0
- package/dist/core/behavior/create-field-path.js +69 -0
- package/dist/core/behavior/index.d.ts +12 -0
- package/dist/core/behavior/index.js +17 -0
- package/dist/core/behavior/types.d.ts +152 -0
- package/dist/core/behavior/types.js +7 -0
- package/dist/core/context/form-context-impl.d.ts +29 -0
- package/dist/core/context/form-context-impl.js +37 -0
- package/dist/core/factories/index.d.ts +6 -0
- package/dist/core/factories/index.js +6 -0
- package/dist/core/factories/node-factory.d.ts +209 -0
- package/dist/core/factories/node-factory.js +281 -0
- package/dist/core/nodes/array-node.d.ts +308 -0
- package/dist/core/nodes/array-node.js +534 -0
- package/dist/core/nodes/field-node.d.ts +269 -0
- package/dist/core/nodes/field-node.js +510 -0
- package/dist/core/nodes/form-node.d.ts +342 -0
- package/dist/core/nodes/form-node.js +343 -0
- package/dist/core/nodes/group-node/field-registry.d.ts +191 -0
- package/dist/core/nodes/group-node/field-registry.js +215 -0
- package/dist/core/nodes/group-node/index.d.ts +11 -0
- package/dist/core/nodes/group-node/index.js +11 -0
- package/dist/core/nodes/group-node/proxy-builder.d.ts +71 -0
- package/dist/core/nodes/group-node/proxy-builder.js +161 -0
- package/dist/core/nodes/group-node/state-manager.d.ts +184 -0
- package/dist/core/nodes/group-node/state-manager.js +265 -0
- package/dist/core/nodes/group-node.d.ts +494 -0
- package/dist/core/nodes/group-node.js +770 -0
- package/dist/core/types/deep-schema.d.ts +78 -0
- package/dist/core/types/deep-schema.js +11 -0
- package/dist/core/types/field-path.d.ts +42 -0
- package/dist/core/types/field-path.js +4 -0
- package/dist/core/types/form-context.d.ts +83 -0
- package/dist/core/types/form-context.js +25 -0
- package/dist/core/types/group-node-proxy.d.ts +135 -0
- package/dist/core/types/group-node-proxy.js +31 -0
- package/dist/core/types/index.d.ts +163 -0
- package/dist/core/types/index.js +4 -0
- package/dist/core/types/validation-schema.d.ts +104 -0
- package/dist/core/types/validation-schema.js +10 -0
- package/dist/core/utils/create-form.d.ts +61 -0
- package/dist/core/utils/create-form.js +24 -0
- package/dist/core/utils/debounce.d.ts +160 -0
- package/dist/core/utils/debounce.js +197 -0
- package/dist/core/utils/error-handler.d.ts +180 -0
- package/dist/core/utils/error-handler.js +226 -0
- package/dist/core/utils/field-path-navigator.d.ts +240 -0
- package/dist/core/utils/field-path-navigator.js +374 -0
- package/dist/core/utils/index.d.ts +14 -0
- package/dist/core/utils/index.js +14 -0
- package/dist/core/utils/registry-helpers.d.ts +50 -0
- package/dist/core/utils/registry-helpers.js +79 -0
- package/dist/core/utils/registry-stack.d.ts +69 -0
- package/dist/core/utils/registry-stack.js +86 -0
- package/dist/core/utils/resources.d.ts +41 -0
- package/dist/core/utils/resources.js +69 -0
- package/dist/core/utils/subscription-manager.d.ts +180 -0
- package/dist/core/utils/subscription-manager.js +214 -0
- package/dist/core/utils/type-guards.d.ts +116 -0
- package/dist/core/utils/type-guards.js +169 -0
- package/dist/core/validation/core/apply-when.d.ts +28 -0
- package/dist/core/validation/core/apply-when.js +41 -0
- package/dist/core/validation/core/apply.d.ts +63 -0
- package/dist/core/validation/core/apply.js +38 -0
- package/dist/core/validation/core/index.d.ts +8 -0
- package/dist/core/validation/core/index.js +8 -0
- package/dist/core/validation/core/validate-async.d.ts +42 -0
- package/dist/core/validation/core/validate-async.js +45 -0
- package/dist/core/validation/core/validate-tree.d.ts +35 -0
- package/dist/core/validation/core/validate-tree.js +37 -0
- package/dist/core/validation/core/validate.d.ts +32 -0
- package/dist/core/validation/core/validate.js +38 -0
- package/dist/core/validation/field-path.d.ts +43 -0
- package/dist/core/validation/field-path.js +147 -0
- package/dist/core/validation/index.d.ts +21 -0
- package/dist/core/validation/index.js +33 -0
- package/dist/core/validation/validate-form.d.ts +85 -0
- package/dist/core/validation/validate-form.js +152 -0
- package/dist/core/validation/validation-applicator.d.ts +89 -0
- package/dist/core/validation/validation-applicator.js +217 -0
- package/dist/core/validation/validation-context.d.ts +47 -0
- package/dist/core/validation/validation-context.js +75 -0
- package/dist/core/validation/validation-registry.d.ts +156 -0
- package/dist/core/validation/validation-registry.js +298 -0
- package/dist/core/validation/validators/array-validators.d.ts +63 -0
- package/dist/core/validation/validators/array-validators.js +86 -0
- package/dist/core/validation/validators/date.d.ts +38 -0
- package/dist/core/validation/validators/date.js +117 -0
- package/dist/core/validation/validators/email.d.ts +44 -0
- package/dist/core/validation/validators/email.js +60 -0
- package/dist/core/validation/validators/index.d.ts +14 -0
- package/dist/core/validation/validators/index.js +14 -0
- package/dist/core/validation/validators/max-length.d.ts +45 -0
- package/dist/core/validation/validators/max-length.js +60 -0
- package/dist/core/validation/validators/max.d.ts +45 -0
- package/dist/core/validation/validators/max.js +60 -0
- package/dist/core/validation/validators/min-length.d.ts +45 -0
- package/dist/core/validation/validators/min-length.js +60 -0
- package/dist/core/validation/validators/min.d.ts +45 -0
- package/dist/core/validation/validators/min.js +60 -0
- package/dist/core/validation/validators/number.d.ts +38 -0
- package/dist/core/validation/validators/number.js +90 -0
- package/dist/core/validation/validators/pattern.d.ts +47 -0
- package/dist/core/validation/validators/pattern.js +62 -0
- package/dist/core/validation/validators/phone.d.ts +34 -0
- package/dist/core/validation/validators/phone.js +58 -0
- package/dist/core/validation/validators/required.d.ts +48 -0
- package/dist/core/validation/validators/required.js +69 -0
- package/dist/core/validation/validators/url.d.ts +29 -0
- package/dist/core/validation/validators/url.js +55 -0
- package/dist/create-field-path-CdPF3lIK.js +704 -0
- package/dist/hooks/useFormControl.d.ts +48 -0
- package/dist/hooks/useFormControl.js +298 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +8 -0
- package/dist/node-factory-D7DOnSSN.js +3200 -0
- package/dist/validators.d.ts +2 -0
- package/dist/validators.js +298 -0
- package/llms.txt +847 -0
- package/package.json +86 -0
|
@@ -0,0 +1,298 @@
|
|
|
1
|
+
import { h as g, t as o, j as f, a as x, G as y, A } from "./node-factory-D7DOnSSN.js";
|
|
2
|
+
import { T as G, V as U, k as B } from "./node-factory-D7DOnSSN.js";
|
|
3
|
+
import { g as u, V as w } from "./create-field-path-CdPF3lIK.js";
|
|
4
|
+
function m(r, e, a) {
|
|
5
|
+
if (!r) return;
|
|
6
|
+
const t = g(r);
|
|
7
|
+
u().registerSync(t, e, a);
|
|
8
|
+
}
|
|
9
|
+
function D(r, e, a) {
|
|
10
|
+
const t = g(r);
|
|
11
|
+
u().registerAsync(t, e, a);
|
|
12
|
+
}
|
|
13
|
+
function b(r, e) {
|
|
14
|
+
u().registerTree(r, e);
|
|
15
|
+
}
|
|
16
|
+
function R(r, e) {
|
|
17
|
+
if (!Array.isArray(r) && !Array.isArray(e) && r && !("__key" in r) && !("__path" in r)) {
|
|
18
|
+
e(r);
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
const a = (Array.isArray(r) ? r : [r]).filter(
|
|
22
|
+
Boolean
|
|
23
|
+
), t = Array.isArray(e) ? e : [e];
|
|
24
|
+
for (const n of a) {
|
|
25
|
+
const s = o(n);
|
|
26
|
+
for (const c of t)
|
|
27
|
+
c(s);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
function p(r, e, a) {
|
|
31
|
+
const t = g(r);
|
|
32
|
+
u().enterCondition(t, e);
|
|
33
|
+
try {
|
|
34
|
+
const n = f();
|
|
35
|
+
a(n);
|
|
36
|
+
} finally {
|
|
37
|
+
u().exitCondition();
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
function N(r, e) {
|
|
41
|
+
r && m(r, (a) => a == null || a === "" ? {
|
|
42
|
+
code: "required",
|
|
43
|
+
message: e?.message || "Поле обязательно для заполнения",
|
|
44
|
+
params: e?.params
|
|
45
|
+
} : typeof a == "boolean" && a !== !0 ? {
|
|
46
|
+
code: "required",
|
|
47
|
+
message: e?.message || "Поле обязательно для заполнения",
|
|
48
|
+
params: e?.params
|
|
49
|
+
} : null);
|
|
50
|
+
}
|
|
51
|
+
function L(r, e, a) {
|
|
52
|
+
r && m(r, (t) => t == null ? null : t < e ? {
|
|
53
|
+
code: "min",
|
|
54
|
+
message: a?.message || `Минимальное значение: ${e}`,
|
|
55
|
+
params: { min: e, actual: t, ...a?.params }
|
|
56
|
+
} : null);
|
|
57
|
+
}
|
|
58
|
+
function C(r, e, a) {
|
|
59
|
+
r && m(r, (t) => t == null ? null : t > e ? {
|
|
60
|
+
code: "max",
|
|
61
|
+
message: a?.message || `Максимальное значение: ${e}`,
|
|
62
|
+
params: { max: e, actual: t, ...a?.params }
|
|
63
|
+
} : null);
|
|
64
|
+
}
|
|
65
|
+
function _(r, e, a) {
|
|
66
|
+
r && m(r, (t) => t && t.length < e ? {
|
|
67
|
+
code: "minLength",
|
|
68
|
+
message: a?.message || `Минимальная длина: ${e} символов`,
|
|
69
|
+
params: { minLength: e, actualLength: t.length, ...a?.params }
|
|
70
|
+
} : null);
|
|
71
|
+
}
|
|
72
|
+
function T(r, e, a) {
|
|
73
|
+
r && m(r, (t) => t && t.length > e ? {
|
|
74
|
+
code: "maxLength",
|
|
75
|
+
message: a?.message || `Максимальная длина: ${e} символов`,
|
|
76
|
+
params: { maxLength: e, actualLength: t.length, ...a?.params }
|
|
77
|
+
} : null);
|
|
78
|
+
}
|
|
79
|
+
function V(r, e) {
|
|
80
|
+
if (!r) return;
|
|
81
|
+
const a = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
|
82
|
+
m(r, (t) => t ? a.test(t) ? null : {
|
|
83
|
+
code: "email",
|
|
84
|
+
message: e?.message || "Неверный формат email",
|
|
85
|
+
params: e?.params
|
|
86
|
+
} : null);
|
|
87
|
+
}
|
|
88
|
+
function q(r, e, a) {
|
|
89
|
+
r && m(r, (t) => t ? e.test(t) ? null : {
|
|
90
|
+
code: "pattern",
|
|
91
|
+
message: a?.message || "Значение не соответствует требуемому формату",
|
|
92
|
+
params: { pattern: e.source, ...a?.params }
|
|
93
|
+
} : null);
|
|
94
|
+
}
|
|
95
|
+
function z(r, e) {
|
|
96
|
+
if (!r) return;
|
|
97
|
+
const a = /^(https?:\/\/)?([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w \.-]*)*\/?$/i, t = /^https?:\/\/([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w \.-]*)*\/?$/i;
|
|
98
|
+
m(r, (n) => n ? (e?.requireProtocol ? t : a).test(n) ? e?.allowedProtocols && e.allowedProtocols.length > 0 && !e.allowedProtocols.some(
|
|
99
|
+
(l) => n.toLowerCase().startsWith(`${l}://`)
|
|
100
|
+
) ? {
|
|
101
|
+
code: "url_protocol",
|
|
102
|
+
message: e?.message || `URL должен использовать один из протоколов: ${e.allowedProtocols.join(", ")}`,
|
|
103
|
+
params: { allowedProtocols: e.allowedProtocols, ...e?.params }
|
|
104
|
+
} : null : {
|
|
105
|
+
code: "url",
|
|
106
|
+
message: e?.message || "Неверный формат URL",
|
|
107
|
+
params: e?.params
|
|
108
|
+
} : null);
|
|
109
|
+
}
|
|
110
|
+
function I(r, e) {
|
|
111
|
+
if (!r) return;
|
|
112
|
+
const a = e?.format || "any", t = {
|
|
113
|
+
// Международный формат: +1234567890 или +1 234 567 8900
|
|
114
|
+
international: /^\+?[1-9]\d{1,14}$/,
|
|
115
|
+
// Российский формат: +7 (XXX) XXX-XX-XX, 8 (XXX) XXX-XX-XX, и вариации
|
|
116
|
+
ru: /^(\+7|7|8)?[\s\-]?\(?[489][0-9]{2}\)?[\s\-]?[0-9]{3}[\s\-]?[0-9]{2}[\s\-]?[0-9]{2}$/,
|
|
117
|
+
// US формат: (123) 456-7890, 123-456-7890, 1234567890
|
|
118
|
+
us: /^(\+?1)?[\s\-]?\(?[2-9]\d{2}\)?[\s\-]?\d{3}[\s\-]?\d{4}$/,
|
|
119
|
+
// Любой формат: минимум 10 цифр с возможными разделителями
|
|
120
|
+
any: /^[\+]?[(]?[0-9]{1,4}[)]?[-\s\.]?[(]?[0-9]{1,4}[)]?[-\s\.]?[0-9]{1,9}$/
|
|
121
|
+
};
|
|
122
|
+
m(r, (n) => {
|
|
123
|
+
if (!n)
|
|
124
|
+
return null;
|
|
125
|
+
if (!t[a].test(n)) {
|
|
126
|
+
const c = {
|
|
127
|
+
international: "Введите телефон в международном формате (например, +1234567890)",
|
|
128
|
+
ru: "Введите российский номер телефона (например, +7 900 123-45-67)",
|
|
129
|
+
us: "Введите американский номер телефона (например, (123) 456-7890)",
|
|
130
|
+
any: "Неверный формат телефона"
|
|
131
|
+
};
|
|
132
|
+
return {
|
|
133
|
+
code: "phone",
|
|
134
|
+
message: e?.message || c[a],
|
|
135
|
+
params: { format: a, ...e?.params }
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
return null;
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
function P(r, e) {
|
|
142
|
+
r && m(r, (a) => a == null ? null : typeof a != "number" || isNaN(a) ? {
|
|
143
|
+
code: "number",
|
|
144
|
+
message: e?.message || "Значение должно быть числом",
|
|
145
|
+
params: e?.params
|
|
146
|
+
} : e?.integer && !Number.isInteger(a) ? {
|
|
147
|
+
code: "number_integer",
|
|
148
|
+
message: e?.message || "Значение должно быть целым числом",
|
|
149
|
+
params: e?.params
|
|
150
|
+
} : e?.min !== void 0 && a < e.min ? {
|
|
151
|
+
code: "number_min",
|
|
152
|
+
message: e?.message || `Значение должно быть не менее ${e.min}`,
|
|
153
|
+
params: { min: e.min, ...e?.params }
|
|
154
|
+
} : e?.max !== void 0 && a > e.max ? {
|
|
155
|
+
code: "number_max",
|
|
156
|
+
message: e?.message || `Значение должно быть не более ${e.max}`,
|
|
157
|
+
params: { max: e.max, ...e?.params }
|
|
158
|
+
} : e?.multipleOf !== void 0 && a % e.multipleOf !== 0 ? {
|
|
159
|
+
code: "number_multiple",
|
|
160
|
+
message: e?.message || `Значение должно быть кратно ${e.multipleOf}`,
|
|
161
|
+
params: { multipleOf: e.multipleOf, ...e?.params }
|
|
162
|
+
} : e?.allowNegative === !1 && a < 0 ? {
|
|
163
|
+
code: "number_negative",
|
|
164
|
+
message: e?.message || "Отрицательные числа не допускаются",
|
|
165
|
+
params: e?.params
|
|
166
|
+
} : e?.allowZero === !1 && a === 0 ? {
|
|
167
|
+
code: "number_zero",
|
|
168
|
+
message: e?.message || "Ноль не допускается",
|
|
169
|
+
params: e?.params
|
|
170
|
+
} : null);
|
|
171
|
+
}
|
|
172
|
+
function H(r, e) {
|
|
173
|
+
r && m(r, (a) => {
|
|
174
|
+
if (!a)
|
|
175
|
+
return null;
|
|
176
|
+
let t;
|
|
177
|
+
if (a instanceof Date)
|
|
178
|
+
t = a;
|
|
179
|
+
else if (typeof a == "string")
|
|
180
|
+
t = new Date(a);
|
|
181
|
+
else
|
|
182
|
+
return {
|
|
183
|
+
code: "date_invalid",
|
|
184
|
+
message: e?.message || "Неверный формат даты",
|
|
185
|
+
params: e?.params
|
|
186
|
+
};
|
|
187
|
+
if (isNaN(t.getTime()))
|
|
188
|
+
return {
|
|
189
|
+
code: "date_invalid",
|
|
190
|
+
message: e?.message || "Неверный формат даты",
|
|
191
|
+
params: e?.params
|
|
192
|
+
};
|
|
193
|
+
const n = /* @__PURE__ */ new Date();
|
|
194
|
+
if (n.setHours(0, 0, 0, 0), e?.minDate) {
|
|
195
|
+
const s = new Date(e.minDate);
|
|
196
|
+
if (s.setHours(0, 0, 0, 0), t < s)
|
|
197
|
+
return {
|
|
198
|
+
code: "date_min",
|
|
199
|
+
message: e?.message || `Дата должна быть не ранее ${s.toLocaleDateString()}`,
|
|
200
|
+
params: { minDate: e.minDate, ...e?.params }
|
|
201
|
+
};
|
|
202
|
+
}
|
|
203
|
+
if (e?.maxDate) {
|
|
204
|
+
const s = new Date(e.maxDate);
|
|
205
|
+
if (s.setHours(0, 0, 0, 0), t > s)
|
|
206
|
+
return {
|
|
207
|
+
code: "date_max",
|
|
208
|
+
message: e?.message || `Дата должна быть не позднее ${s.toLocaleDateString()}`,
|
|
209
|
+
params: { maxDate: e.maxDate, ...e?.params }
|
|
210
|
+
};
|
|
211
|
+
}
|
|
212
|
+
if (e?.noFuture && t > n)
|
|
213
|
+
return {
|
|
214
|
+
code: "date_future",
|
|
215
|
+
message: e?.message || "Дата не может быть в будущем",
|
|
216
|
+
params: e?.params
|
|
217
|
+
};
|
|
218
|
+
if (e?.noPast && t < n)
|
|
219
|
+
return {
|
|
220
|
+
code: "date_past",
|
|
221
|
+
message: e?.message || "Дата не может быть в прошлом",
|
|
222
|
+
params: e?.params
|
|
223
|
+
};
|
|
224
|
+
if (e?.minAge !== void 0 || e?.maxAge !== void 0) {
|
|
225
|
+
const s = Math.floor(
|
|
226
|
+
(n.getTime() - t.getTime()) / 315576e5
|
|
227
|
+
);
|
|
228
|
+
if (e?.minAge !== void 0 && s < e.minAge)
|
|
229
|
+
return {
|
|
230
|
+
code: "date_min_age",
|
|
231
|
+
message: e?.message || `Минимальный возраст: ${e.minAge} лет`,
|
|
232
|
+
params: { minAge: e.minAge, currentAge: s, ...e?.params }
|
|
233
|
+
};
|
|
234
|
+
if (e?.maxAge !== void 0 && s > e.maxAge)
|
|
235
|
+
return {
|
|
236
|
+
code: "date_max_age",
|
|
237
|
+
message: e?.message || `Максимальный возраст: ${e.maxAge} лет`,
|
|
238
|
+
params: { maxAge: e.maxAge, currentAge: s, ...e?.params }
|
|
239
|
+
};
|
|
240
|
+
}
|
|
241
|
+
return null;
|
|
242
|
+
});
|
|
243
|
+
}
|
|
244
|
+
function M(r, e) {
|
|
245
|
+
r && _(r, 1, {
|
|
246
|
+
message: e?.message || "Массив не должен быть пустым",
|
|
247
|
+
params: { minLength: 1, ...e?.params }
|
|
248
|
+
});
|
|
249
|
+
}
|
|
250
|
+
function W(r, e) {
|
|
251
|
+
if (!r) return;
|
|
252
|
+
const a = g(r);
|
|
253
|
+
u().registerArrayItemValidation(a, e);
|
|
254
|
+
}
|
|
255
|
+
function i(r) {
|
|
256
|
+
return r instanceof x ? [r] : r instanceof y ? Array.from(r.getAllFields()).flatMap(i) : r instanceof A ? r.map((e) => i(e)).flat() : [];
|
|
257
|
+
}
|
|
258
|
+
async function j(r, e) {
|
|
259
|
+
const a = new w();
|
|
260
|
+
a.beginRegistration();
|
|
261
|
+
let t = [], n = !1;
|
|
262
|
+
try {
|
|
263
|
+
const s = f();
|
|
264
|
+
e(s), t = a.getCurrentContext()?.getValidators() || [], a.cancelRegistration(), n = !0, r.clearErrors();
|
|
265
|
+
const l = i(r);
|
|
266
|
+
return await Promise.all(l.map((d) => d.validate())), t.length > 0 && await r.applyContextualValidators(t), r.valid.value;
|
|
267
|
+
} catch (s) {
|
|
268
|
+
throw n || a.cancelRegistration(), s;
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
export {
|
|
272
|
+
G as TreeValidationContextImpl,
|
|
273
|
+
U as ValidationContextImpl,
|
|
274
|
+
w as ValidationRegistry,
|
|
275
|
+
R as apply,
|
|
276
|
+
p as applyWhen,
|
|
277
|
+
f as createFieldPath,
|
|
278
|
+
H as date,
|
|
279
|
+
V as email,
|
|
280
|
+
B as extractKey,
|
|
281
|
+
g as extractPath,
|
|
282
|
+
C as max,
|
|
283
|
+
T as maxLength,
|
|
284
|
+
L as min,
|
|
285
|
+
_ as minLength,
|
|
286
|
+
M as notEmpty,
|
|
287
|
+
P as number,
|
|
288
|
+
q as pattern,
|
|
289
|
+
I as phone,
|
|
290
|
+
N as required,
|
|
291
|
+
o as toFieldPath,
|
|
292
|
+
z as url,
|
|
293
|
+
m as validate,
|
|
294
|
+
D as validateAsync,
|
|
295
|
+
j as validateForm,
|
|
296
|
+
W as validateItems,
|
|
297
|
+
b as validateTree
|
|
298
|
+
};
|