UNPKG

@effector-reform/zod

Version:

Zod schema adapter for effector-reform forms

16 lines (15 loc) 298 B
function a(e) { return async (r) => { try { return await e.parseAsync(r), null; } catch (u) { const { errors: s } = u; return s.reduce((t, n) => (t[n.path.join(".")] || (t[n.path.join(".")] = n.message), t), {}); } }; } export { a as zodAdapter };