Project Init

This commit is contained in:
Muluhabt
2026-05-29 15:23:46 +03:00
commit 2fbc557aac
67387 changed files with 6063341 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
'use client';
function joiResolver(schema, options) {
const _schema = schema;
return (values) => {
const parsed = _schema.validate(values, { abortEarly: false, ...options });
if (!parsed.error) {
return {};
}
const results = {};
parsed.error.details.forEach((error) => {
results[error.path.join(".")] = error.message;
});
return results;
};
}
export { joiResolver };
//# sourceMappingURL=joi-resolver.mjs.map